ImportMap
Table of Contents
Properties
- $bustSuffix : bool
- $cache : FrontendInterface|null
- $cacheIdentifier : string
- $eventDispatcher : EventDispatcherInterface|null
- $extensionsToLoad : array<string|int, mixed>
- $hashService : HashService
- $packages : array<string|int, mixed>
- $policyRegistry : PolicyRegistry|null
Methods
- __construct() : mixed
- getState() : array<string|int, mixed>
- includeAllImports() : void
- HEADS UP: Do only use in authenticated mode as this discloses as installed extensions
- includeImportsFor() : void
- includeTaggedImports() : void
- render() : string
- resolveImport() : string|null
- updateState() : void
- warmupCaches() : void
- composeImportMap() : array<string|int, mixed>
- computeImportMaps() : array<string|int, mixed>
- dispatchResolveJavaScriptImportEvent() : string|null
- getFromCache() : array<string|int, mixed>|null
- getImportMaps() : array<string|int, mixed>
- loadDependency() : void
- resolvePaths() : array<string|int, mixed>
- resolveRecursiveImportMap() : array<string|int, mixed>
Properties
$bustSuffix read-only
        protected
            bool
    $bustSuffix
     = true
    
    
    
    
    
$cache read-only
        protected
            FrontendInterface|null
    $cache
     = null
    
    
    
    
    
$cacheIdentifier read-only
        protected
            string
    $cacheIdentifier
     = ''
    
    
    
    
    
$eventDispatcher read-only
        protected
            EventDispatcherInterface|null
    $eventDispatcher
     = null
    
    
    
    
    
$extensionsToLoad
        protected
            array<string|int, mixed>
    $extensionsToLoad
     = []
    
    
    
    
    
$hashService read-only
        protected
            HashService
    $hashService
    
    
    
    
    
    
$packages read-only
        protected
            array<string|int, mixed>
    $packages
    
    
    
    
    
    
$policyRegistry read-only
        protected
            PolicyRegistry|null
    $policyRegistry
     = null
    
    
    
    
    
Methods
__construct()
    public
                    __construct(HashService $hashService, array<int, PackageInterface> $packages[, PolicyRegistry|null $policyRegistry = null ][, FrontendInterface|null $cache = null ][, string $cacheIdentifier = '' ][, EventDispatcherInterface|null $eventDispatcher = null ][, bool $bustSuffix = true ]) : mixed
    Parameters
- $hashService : HashService
- $packages : array<int, PackageInterface>
- $policyRegistry : PolicyRegistry|null = null
- $cache : FrontendInterface|null = null
- $cacheIdentifier : string = ''
- $eventDispatcher : EventDispatcherInterface|null = null
- $bustSuffix : bool = true
getState()
    public
                    getState() : array<string|int, mixed>
    Return values
array<string|int, mixed>includeAllImports()
HEADS UP: Do only use in authenticated mode as this discloses as installed extensions
    public
                    includeAllImports() : void
    includeImportsFor()
    public
                    includeImportsFor(string $specifier) : void
    Parameters
- $specifier : string
includeTaggedImports()
    public
                    includeTaggedImports(string $tag) : void
    Parameters
- $tag : string
render()
    public
                    render(string $urlPrefix, null|string|ConsumableNonce $nonce) : string
    Parameters
- $urlPrefix : string
- $nonce : null|string|ConsumableNonce
Return values
stringresolveImport()
    public
                    resolveImport(string $specifier[, bool $loadImportConfiguration = true ]) : string|null
    Parameters
- $specifier : string
- $loadImportConfiguration : bool = true
Return values
string|nullupdateState()
    public
                    updateState(array<string|int, mixed> $state) : void
    Parameters
- $state : array<string|int, mixed>
warmupCaches()
    public
                    warmupCaches() : void
    composeImportMap()
    protected
                    composeImportMap(string $urlPrefix) : array<string|int, mixed>
    Parameters
- $urlPrefix : string
Return values
array<string|int, mixed>computeImportMaps()
    protected
                    computeImportMaps() : array<string|int, mixed>
    Return values
array<string|int, mixed>dispatchResolveJavaScriptImportEvent()
    protected
                    dispatchResolveJavaScriptImportEvent(string $specifier[, bool $loadImportConfiguration = true ]) : string|null
    Parameters
- $specifier : string
- $loadImportConfiguration : bool = true
Return values
string|nullgetFromCache()
    protected
                    getFromCache() : array<string|int, mixed>|null
    Return values
array<string|int, mixed>|nullgetImportMaps()
    protected
                    getImportMaps() : array<string|int, mixed>
    Return values
array<string|int, mixed>loadDependency()
    protected
                    loadDependency(string $packageName) : void
    Parameters
- $packageName : string
resolvePaths()
    protected
                    resolvePaths(array<string|int, mixed> $imports[, string|null $bust = null ]) : array<string|int, mixed>
    Parameters
- $imports : array<string|int, mixed>
- $bust : string|null = null
Return values
array<string|int, mixed>resolveRecursiveImportMap()
    protected
                    resolveRecursiveImportMap(string $prefix, string $path, array<string|int, mixed> $exclude, string $bust) : array<string|int, mixed>
    Parameters
- $prefix : string
- $path : string
- $exclude : array<string|int, mixed>
- $bust : string