WebAssetRegistryInterface

Web Asset Registry interface

since

4.0.0

Methods

add

Add Asset to registry of known assets

add(string $type, \Joomla\CMS\WebAsset\WebAssetItemInterface $asset) : self
since

4.0.0

Arguments

$type

stringAsset type, script or style etc

$asset

\Joomla\CMS\WebAsset\WebAssetItemInterfaceAsset instance

Response

self

exists

Check whether the asset exists in the registry.

exists(string $type, string $name) : boolean
since

4.0.0

Arguments

$type

stringAsset type, script or style etc

$name

stringAsset name

Response

boolean

get

Get an existing Asset from a registry, by asset name and asset type.

get(string $type, string $name) : \Joomla\CMS\WebAsset\WebAssetItem
throws

\Joomla\CMS\WebAsset\Exception\UnknownAssetExceptionWhen Asset cannot be found

since

4.0.0

Arguments

$type

stringAsset type, script or style etc

$name

stringAsset name

Response

\Joomla\CMS\WebAsset\WebAssetItem

remove

Remove Asset from registry.

remove(string $type, string $name) : self
since

4.0.0

Arguments

$type

stringAsset type, script or style etc

$name

stringAsset name

Response

self