ImportMap

Internal

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>

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

$cacheIdentifier read-only

protected string $cacheIdentifier = ''

$eventDispatcher read-only

protected EventDispatcherInterface|null $eventDispatcher = null

$extensionsToLoad

protected array<string|int, mixed> $extensionsToLoad = []

$packages read-only

protected array<string|int, mixed> $packages

Methods

__construct()

public __construct(HashService $hashService, array<int, PackageInterface$packages[, FrontendInterface|null $cache = null ][, string $cacheIdentifier = '' ][, EventDispatcherInterface|null $eventDispatcher = null ][, bool $bustSuffix = true ]) : mixed
Parameters
$hashService : HashService
$packages : array<int, PackageInterface>
$cache : FrontendInterface|null = null
$cacheIdentifier : string = ''
$eventDispatcher : EventDispatcherInterface|null = null
$bustSuffix : bool = true

getState()

public getState() : array<string|int, mixed>
Internal
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

resolveImport()

public resolveImport(string $specifier[, bool $loadImportConfiguration = true ]) : string|null
Parameters
$specifier : string
$loadImportConfiguration : bool = true
Return values
string|null

updateState()

public updateState(array<string|int, mixed> $state) : void
Parameters
$state : array<string|int, mixed>
Internal

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|null

getFromCache()

protected getFromCache() : array<string|int, mixed>|null
Return values
array<string|int, mixed>|null

getImportMaps()

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
Return values
array<string|int, mixed>

        
On this page

Search results