CoreFiles by mySites.guru
WebAssetManagerInterface.php94 lines, 2,254 bytes, from Joomla_4.0.0-alpha10-Alpha-Full_Package.zip
Raw History Compare with 4.0.0-alpha9
md5
936172f5507173d58d0135a710ee1313
sha1
f13e209207326716c3ffb221cda152188947d080
sha256
77c27019f7d99eaa720c745641d35e4a82d24348a10b429ebec8c6a211a39cd6
<?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  bool
	 *
	 * @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.