ImportMap

Internal

Table of Contents

Properties

$bustSuffix  : bool
$cache  : FrontendInterface|null
$cacheIdentifier  : string
$eventDispatcher  : EventDispatcherInterface|null
$extensionsToLoad  : array
$hashService  : HashService
$packages  : array
$policyRegistry  : PolicyRegistry|null

Methods

__construct()  : mixed
getState()  : array
includeAllImports()  : void
HEADS UP: Do only use in authenticated mode as this discloses as installed extensions
includeImportsFor()  : void
includeTaggedImports()  : void
render()  : string
resolveImport()  : non-empty-string|null
updateState()  : void
warmupCaches()  : void
composeImportMap()  : array
computeImportMaps()  : array
dispatchResolveJavaScriptImportEvent()  : non-empty-string|null
dispatchResolveVirtualJavaScriptImportEvent()  : non-empty-string|null
getFromCache()  : array|null
getImportMaps()  : array
getResourceUri()  : string
loadDependency()  : void
resolvePaths()  : array
resolveRecursiveImportMap()  : array

Properties

$bustSuffix read-only

protected bool $bustSuffix = true

$cacheIdentifier read-only

protected string $cacheIdentifier = ''

$eventDispatcher read-only

protected EventDispatcherInterface|null $eventDispatcher = null

$extensionsToLoad

protected array $extensionsToLoad = []

$packages read-only

protected array $packages

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
Internal
Return values
array

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

resolveImport()

public resolveImport(string $specifier[, bool $loadImportConfiguration = true ][, string $uriPrefix = '/' ]) : non-empty-string|null
Parameters
$specifier : string
$loadImportConfiguration : bool = true
$uriPrefix : string = '/'
Return values
non-empty-string|null

updateState()

public updateState(array $state) : void
Parameters
$state : array
Internal

warmupCaches()

public warmupCaches() : void

composeImportMap()

protected composeImportMap(string $uriPrefix) : array
Parameters
$uriPrefix : string
Return values
array

computeImportMaps()

protected computeImportMaps() : array
Return values
array

dispatchResolveJavaScriptImportEvent()

protected dispatchResolveJavaScriptImportEvent(string $specifier[, bool $loadImportConfiguration = true ]) : non-empty-string|null
Parameters
$specifier : string
$loadImportConfiguration : bool = true
Return values
non-empty-string|null

dispatchResolveVirtualJavaScriptImportEvent()

protected dispatchResolveVirtualJavaScriptImportEvent(string $specifier) : non-empty-string|null
Parameters
$specifier : string
Return values
non-empty-string|null

getFromCache()

protected getFromCache() : array|null
Return values
array|null

getImportMaps()

protected getImportMaps() : array
Return values
array

loadDependency()

protected loadDependency(string $packageName) : void
Parameters
$packageName : string

resolvePaths()

protected resolvePaths(array $imports[, string|null $bust = null ]) : array
Parameters
$imports : array
$bust : string|null = null
Return values
array

resolveRecursiveImportMap()

protected resolveRecursiveImportMap(string $prefix, string $pathResourceIdentifier, array $exclude, string $bust) : array
Parameters
$prefix : string
$pathResourceIdentifier : string
$exclude : array
$bust : string
Return values
array
On this page

Search results