/**
* Get a state for the Asset
*
* @param string $type The asset type, script or style
* @param string $name The asset name
*
* @return integer
*
* @throws UnknownAssetException When Asset cannot be found
*
* @since 4.0.0
*/
public function getAssetState(string $type, string $name) : int
{
// Check whether asset exists first
$this->registry->get($type, $name);
// Make sure that all dependencies are active
if (!$this->dependenciesIsActual) {
$this->enableDependencies();
}
if (!empty($this->activeAssets[$type][$name])) {
return $this->activeAssets[$type][$name];
}
return static::ASSET_STATE_INACTIVE;
}