class Assets

Properties

protected Container $container
protected Config $config
protected Assets $assets

Methods

__construct(Container $container, Config $config)

No description

forFrontend(string $name)

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

__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 <p>frontend name</p>

Return Value

Assets

Exceptions

BindingResolutionException

__invoke(Document $document, ServerRequestInterface $request)

Parameters

Document $document
ServerRequestInterface $request

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