AssetList
trait AssetList (View source)
internal |
Manage a list of assets grouped into bundles.
Methods
static void
add(string $file, string $bundle = 'default')
Add an asset to a bundle.
static array
urls(array $bundles)
Compile the given bundles and return their URLs.
static void
flush()
Flush all bundles so they are regenerated on the next request.
static void
flushBundle(string $bundle)
Flush a specific bundle so that is it regenerated on the next request.
Details
static void
add(string $file, string $bundle = 'default')
Add an asset to a bundle.
The default
and default-{locale}
bundles are loaded on every page
that uses the Waterhole layout. The cp
and cp-{locale}
bundles
are loaded on pages in the Control Panel.
static array
urls(array $bundles)
Compile the given bundles and return their URLs.
static void
flush()
Flush all bundles so they are regenerated on the next request.
static void
flushBundle(string $bundle)
Flush a specific bundle so that is it regenerated on the next request.