‪TYPO3CMS  ‪main
ImportMapFactory.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
5 /*
6  * This file is part of the TYPO3 CMS project.
7  *
8  * It is free software; you can redistribute it and/or modify it under
9  * the terms of the GNU General Public License, either version 2
10  * of the License, or any later version.
11  *
12  * For the full copyright and license information, please read the
13  * LICENSE.txt file that was distributed with this source code.
14  *
15  * The TYPO3 project - inspiring people to share!
16  */
17 
18 namespace ‪TYPO3\CMS\Core\Page;
19 
20 use Psr\EventDispatcher\EventDispatcherInterface;
23 use TYPO3\CMS\Core\Package\PackageManager;
25 
27 {
28  public function ‪__construct(
29  private readonly ‪HashService $hashService,
30  private readonly PackageManager $packageManager,
31  private readonly ‪FrontendInterface $assetsCache,
32  private readonly EventDispatcherInterface $eventDispatcher,
33  private readonly string $cacheIdentifier,
34  ) {}
35 
36  public function ‪create(bool $bustSuffix = true): ‪ImportMap
37  {
38  $activePackages = array_values(
39  $this->packageManager->getActivePackages()
40  );
41  return new ‪ImportMap(
42  $this->hashService,
43  $activePackages,
44  $this->assetsCache,
45  $this->cacheIdentifier,
46  $this->eventDispatcher,
47  $bustSuffix
48  );
49  }
50 }
‪TYPO3\CMS\Core\Page\ImportMapFactory
Definition: ImportMapFactory.php:27
‪TYPO3\CMS\Core\Page\ImportMap
Definition: ImportMap.php:35
‪TYPO3\CMS\Core\Page
Definition: AssetCollector.php:18
‪TYPO3\CMS\Core\Page\ImportMapFactory\create
‪create(bool $bustSuffix=true)
Definition: ImportMapFactory.php:36
‪TYPO3\CMS\Core\Cache\Frontend\FrontendInterface
Definition: FrontendInterface.php:22
‪TYPO3\CMS\Core\SingletonInterface
Definition: SingletonInterface.php:22
‪TYPO3\CMS\Core\Page\ImportMapFactory\__construct
‪__construct(private readonly HashService $hashService, private readonly PackageManager $packageManager, private readonly FrontendInterface $assetsCache, private readonly EventDispatcherInterface $eventDispatcher, private readonly string $cacheIdentifier,)
Definition: ImportMapFactory.php:28
‪TYPO3\CMS\Core\Crypto\HashService
Definition: HashService.php:27