- md5
- b3c402cad096456224a8626cb94c70ba
- sha1
- 1689228e55d031732ea2e293f2c381a6f461d60b
- sha256
- ebc22d70985902626fc0afcd97c2aed866f992e12c90c3e865177bbc6586c485
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
<?php
/**
* Joomla! Content Management System
*
* @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
namespace Joomla\CMS\WebAsset;
\defined('JPATH_PLATFORM') or die;
use Joomla\CMS\Document\Document;
use Joomla\CMS\WebAsset\Exception\InvalidActionException;
use Joomla\CMS\WebAsset\Exception\UnknownAssetException;
use Joomla\CMS\WebAsset\Exception\UnsatisfiedDependencyException;
/**
* Web Asset Manager Interface
*
* @since 4.0.0
*/
interface WebAssetManagerInterface
{
/**
* Activate the Asset item
*
* @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 enableAsset(string $name): self;
/**
* Deactivate the Asset item
*
* @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 $name): self;
/**
* Check whether the asset are enabled
*
* @param string $name The asset name
*
* @return boolean
*
* @throws UnknownAssetException When Asset cannot be found
*
* @since 4.0.0
*/
public function isAssetActive(string $name): bool;
/**
* Get all assets that was enabled
*
* @param bool $sort Whether need to sort the assets to follow the dependency Graph
*
* @return WebAssetItemInterface[]
*
* @throws UnknownAssetException When Asset cannot be found
* @throws UnsatisfiedDependencyException When Dependency cannot be found
*
* @since 4.0.0
*/
public function getAssets(bool $sort = false): array;
/**
* Attach active assets to the document
*
* @param Document $doc Document for attach StyleSheet/JavaScript
*
* @return self
*
* @throws InvalidActionException When the Manager already attached to a Document
*
* @since 4.0.0
*/
public function attachActiveAssetsToDocument(Document $doc): self;
}
No other release has this exact content. See every version of this file.