Back to Joomla project (class list)

Class WebAssetManagerInterface - list of methods

Web Asset Manager Interface
Package: Joomla\CMS\WebAsset
Copyright: (C) 2019 Open Source Matters, Inc.
License: GNU General Public License version 2 or later; see LICENSE.txt
Located at: Joomla/WebAsset/WebAssetManagerInterface.php
Project: Joomla

Method Summary

public self
(string $type, string $name)

Enable an asset item to 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
Show source code of this method: useAsset Source Code

public self
(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
Show source code of this method: disableAsset Source Code

public bool
(string $type, string $name)

Check whether the asset are enabled
Parameters
  • string $type Asset type, script or style etc
  • string $name The asset name
Returns
  • bool
Since
  • 4.0.0
-
  • \Joomla\CMS\WebAsset\Exception\UnknownAssetException When Asset cannot be found
Show source code of this method: isAssetActive Source Code

public \Joomla\CMS\WebAsset\WebAssetItemInterface[]
(string $type, bool $sort = false)

Get all assets that was enabled for given type
Parameters
  • string $type Asset type, script or style etc
  • bool $sort Whether need to sort the assets to follow the dependency Graph
Returns
  • \Joomla\CMS\WebAsset\WebAssetItemInterface[]
Since
  • 4.0.0
-
  • \Joomla\CMS\WebAsset\Exception\UnknownAssetException When Asset cannot be found
  • \Joomla\CMS\WebAsset\Exception\UnsatisfiedDependencyException When Dependency cannot be found
Show source code of this method: getAssets Source Code

Tags Summary

Since
4.0.0