WebAssetRegistryInterface

Web Asset Registry interface

since

4.0.0

package

Joomla CMS

Methods

add

Add Asset to registry of known assets

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

4.0.0

Arguments

type

stringAsset type, script or style etc

asset

WebAssetItemInterfaceAsset instance

Response

self

exists

Check whether the asset exists in the registry.

exists( type,  name) : 
since

4.0.0

Arguments

type

stringAsset type, script or style etc

name

stringAsset name

Response

bool

get

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

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

UnknownAssetExceptionWhen Asset cannot be found

since

4.0.0

Arguments

type

stringAsset type, script or style etc

name

stringAsset name

Response

WebAssetItem

remove

Remove Asset from registry.

remove( type,  name) : 
since

4.0.0

Arguments

type

stringAsset type, script or style etc

name

stringAsset name

Response

self