class AssetManager

Properties

protected array<string,string> $assets

Methods

__construct(Container $container, LocaleManager $locales)

No description

frontend(string $frontend)

No description

array
all()

No description

void
register(string $frontend, string $abstract)

No description

void
markDirty()

Flag every frontend as needing a rebuild, without touching the compiled files or their manifest revisions.

void
flushJs() deprecated

No description

Details

__construct(Container $container, LocaleManager $locales)

Parameters

Container $container
LocaleManager $locales

Assets frontend(string $frontend)

Parameters

string $frontend

Return Value

Assets

array all()

Return Value

array

Exceptions

BindingResolutionException

void register(string $frontend, string $abstract)

Parameters

string $frontend
string $abstract

Return Value

void

void markDirty()

Flag every frontend as needing a rebuild, without touching the compiled files or their manifest revisions.

The rebuild is deferred to the next freshly-booted request. That matters for the settings this is called for: they change which extensions boot, so a rebuild in the saving request — whose container booted before the save — would compile the old extension set and record it as current.

Return Value

void

See also

RecompileFrontendAssets::markDirty

void flushJs() deprecated

deprecated 2.1 Use {@see \Flarum\Frontend\markDirty()} instead, which defers the rebuild to a freshly-booted request rather than deleting the compiled files. Deleting them leaves already-served pages pointing at files that no longer exist, and clears the revisions that tell the next request what to rebuild — so whichever request arrives first recompiles from its own container, which for a safe-mode save is the admin's own browser running a reduced extension set.

Return Value

void