class Assets

Properties

protected $assets
protected $commonAssets

Methods

__construct(Container $container, Config $config)

No description

forFrontend(string $name)

<p>Sets the frontend to generate assets for.</p>

void
__invoke(Document $document, ServerRequestInterface $request)

No description

array
assembleCompilers(string|null $locale)

<p>Assembles JS and CSS compilers to be used to generate frontend assets.</p>

void
addAssetsToDocument(Document $document, array $compilers)

<p>Adds URLs of frontend JS and CSS to the Document class.</p>

void
forceCommit(array $compilers)

<p>Force compilation of assets when in debug mode.</p>

array
getUrls(array $compilers)

<p>Maps provided CompilerInterfaces to their URLs.</p>

Details

__construct(Container $container, Config $config)

Parameters

Container $container
Config $config

Assets forFrontend(string $name)

<p>Sets the frontend to generate assets for.</p>

Parameters

string $name

Return Value

Assets

Exceptions

BindingResolutionException

void __invoke(Document $document, ServerRequestInterface $request)

Parameters

Document $document
ServerRequestInterface $request

Return Value

void

protected array assembleCompilers(string|null $locale)

<p>Assembles JS and CSS compilers to be used to generate frontend assets.</p>

Parameters

string|null $locale

Return Value

array

protected void addAssetsToDocument(Document $document, array $compilers)

<p>Adds URLs of frontend JS and CSS to the Document class.</p>

Parameters

Document $document
array $compilers

Return Value

void

protected void forceCommit(array $compilers)

<p>Force compilation of assets when in debug mode.</p>

Parameters

array $compilers

Return Value

void

protected array getUrls(array $compilers)

<p>Maps provided CompilerInterfaces to their URLs.</p>

Parameters

array $compilers

Return Value

array