Back to WebAssetManagerInterface class

Method disableAsset

public self
disableAsset
(string $type, string $name)
Deactivate an asset item, so it will not be attached to a Document
Parameters
  • string $type Asset type, script or style etc
  • string $name The asset name
Returns
  • self
Since
  • 4.0.0
-
  • \Joomla\CMS\WebAsset\Exception\UnknownAssetException When Asset cannot be found
  • \Joomla\CMS\WebAsset\Exception\InvalidActionException When the Manager already attached to a Document

Method disableAsset - Source code

/**
 * Deactivate an asset item, so it will not be attached to a Document
 *
 * @param   string  $type  Asset type, script or style etc
 * @param   string  $name  The asset name
 *
 * @return self
 *
 * @throws  UnknownAssetException  When Asset cannot be found
 * @throws  InvalidActionException When the Manager already attached to a Document
 *
 * @since  4.0.0
 */
public function disableAsset(string $type, string $name) : self;