Back to WebAssetRegistryInterface class

Method add

public self
add
(string $type, \Joomla\CMS\WebAsset\WebAssetItemInterface $asset)
Add Asset to registry of known assets
Parameters
  • string $type Asset type, script or style etc
  • \Joomla\CMS\WebAsset\WebAssetItemInterface $asset Asset instance
Returns
  • self
Since
  • 4.0.0

Method add - Source code

/**
 * Add Asset to registry of known assets
 *
 * @param   string                 $type   Asset type, script or style etc
 * @param   WebAssetItemInterface  $asset  Asset instance
 *
 * @return  self
 *
 * @since   4.0.0
 */
public function add(string $type, WebAssetItemInterface $asset) : self;