public \Joomla\CMS\WebAsset\WebAssetItem
get
(string $type, string $name)
/**
* Get an existing Asset from a registry, by asset name.
*
* @param string $type Asset type, script or style
* @param string $name Asset name
*
* @return WebAssetItem
*
* @throws UnknownAssetException When Asset cannot be found
*
* @since 4.0.0
*/
public function get(string $type, string $name) : WebAssetItemInterface
{
// Check if any new file was added
$this->parseRegistryFiles();
if (empty($this->assets[$type][$name])) {
throw new UnknownAssetException(sprintf('There is no "%s" asset of a "%s" type in the registry.', $name, $type));
}
return $this->assets[$type][$name];
}