Back to WebAssetManager class

Method assetExists

public bool
assetExists
(string $type, string $name)
Helper method to check whether the asset exists in the registry.
Parameters
  • string $type Asset type, script or style
  • string $name Asset name
Returns
  • bool
Since
  • 4.0.0

Method assetExists - Source code

/**
 * Helper method to check whether the asset exists in the registry.
 *
 * @param   string  $type  Asset type, script or style
 * @param   string  $name  Asset name
 *
 * @return  boolean
 *
 * @since   4.0.0
 */
public function assetExists(string $type, string $name) : bool
{
    return $this->registry->exists($type, $name);
}