‪TYPO3CMS  ‪main
TYPO3\CMS\Core\Page\ImportMap Class Reference

Public Member Functions

 __construct (protected readonly HashService $hashService, protected readonly array $packages, protected readonly ?FrontendInterface $cache=null, protected readonly string $cacheIdentifier='', protected readonly ?EventDispatcherInterface $eventDispatcher=null, protected readonly bool $bustSuffix=true)
 
 includeAllImports ()
 
 includeTaggedImports (string $tag)
 
 includeImportsFor (string $specifier)
 
 resolveImport (string $specifier, bool $loadImportConfiguration=true)
 
 render (string $urlPrefix, null|string|ConsumableNonce $nonce)
 
 warmupCaches ()
 
 updateState (array $state)
 
 getState ()
 

Protected Member Functions

 getImportMaps ()
 
 getFromCache ()
 
 computeImportMaps ()
 
 resolveRecursiveImportMap (string $prefix, string $path, array $exclude, string $bust)
 
 resolvePaths (array $imports, string $bust=null)
 
 loadDependency (string $packageName)
 
 composeImportMap (string $urlPrefix)
 
 dispatchResolveJavaScriptImportEvent (string $specifier, bool $loadImportConfiguration=true)
 

Protected Attributes

array $extensionsToLoad = []
 

Private Attributes

array $importMaps = null
 

Detailed Description

Definition at line 34 of file ImportMap.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Core\Page\ImportMap::__construct ( protected readonly HashService  $hashService,
protected readonly array  $packages,
protected readonly ?FrontendInterface  $cache = null,
protected readonly string  $cacheIdentifier = '',
protected readonly ?EventDispatcherInterface  $eventDispatcher = null,
protected readonly bool  $bustSuffix = true 
)
Parameters
list<PackageInterface>‪$packages

Definition at line 43 of file ImportMap.php.

Member Function Documentation

◆ composeImportMap()

TYPO3\CMS\Core\Page\ImportMap::composeImportMap ( string  $urlPrefix)
protected

◆ computeImportMaps()

◆ dispatchResolveJavaScriptImportEvent()

TYPO3\CMS\Core\Page\ImportMap::dispatchResolveJavaScriptImportEvent ( string  $specifier,
bool  $loadImportConfiguration = true 
)
protected

◆ getFromCache()

TYPO3\CMS\Core\Page\ImportMap::getFromCache ( )
protected

◆ getImportMaps()

◆ getState()

TYPO3\CMS\Core\Page\ImportMap::getState ( )

Definition at line 333 of file ImportMap.php.

References TYPO3\CMS\Core\Page\ImportMap\$extensionsToLoad.

◆ includeAllImports()

TYPO3\CMS\Core\Page\ImportMap::includeAllImports ( )

HEADS UP: Do only use in authenticated mode as this discloses as installed extensions

Definition at line 55 of file ImportMap.php.

◆ includeImportsFor()

TYPO3\CMS\Core\Page\ImportMap::includeImportsFor ( string  $specifier)

◆ includeTaggedImports()

TYPO3\CMS\Core\Page\ImportMap::includeTaggedImports ( string  $tag)

◆ loadDependency()

TYPO3\CMS\Core\Page\ImportMap::loadDependency ( string  $packageName)
protected

◆ render()

TYPO3\CMS\Core\Page\ImportMap::render ( string  $urlPrefix,
null|string|ConsumableNonce  $nonce 
)

◆ resolveImport()

TYPO3\CMS\Core\Page\ImportMap::resolveImport ( string  $specifier,
bool  $loadImportConfiguration = true 
)

◆ resolvePaths()

TYPO3\CMS\Core\Page\ImportMap::resolvePaths ( array  $imports,
string  $bust = null 
)
protected

◆ resolveRecursiveImportMap()

TYPO3\CMS\Core\Page\ImportMap::resolveRecursiveImportMap ( string  $prefix,
string  $path,
array  $exclude,
string  $bust 
)
protected

◆ updateState()

TYPO3\CMS\Core\Page\ImportMap::updateState ( array  $state)

Definition at line 325 of file ImportMap.php.

◆ warmupCaches()

TYPO3\CMS\Core\Page\ImportMap::warmupCaches ( )

Definition at line 138 of file ImportMap.php.

References TYPO3\CMS\Core\Page\ImportMap\computeImportMaps().

Member Data Documentation

◆ $extensionsToLoad

array TYPO3\CMS\Core\Page\ImportMap::$extensionsToLoad = []
protected

Definition at line 36 of file ImportMap.php.

Referenced by TYPO3\CMS\Core\Page\ImportMap\getState().

◆ $importMaps

array TYPO3\CMS\Core\Page\ImportMap::$importMaps = null
private