interface AssetOptimizerInterface in Drupal 10
Same name and namespace in other branches
- 8 core/lib/Drupal/Core/Asset/AssetOptimizerInterface.php \Drupal\Core\Asset\AssetOptimizerInterface
- 9 core/lib/Drupal/Core/Asset/AssetOptimizerInterface.php \Drupal\Core\Asset\AssetOptimizerInterface
Interface defining a service that optimizes an asset.
Hierarchy
- interface \Drupal\Core\Asset\AssetOptimizerInterface
Expanded class hierarchy of AssetOptimizerInterface
All classes that implement AssetOptimizerInterface
1 file declares its use of AssetOptimizerInterface
- CssCollectionOptimizerUnitTest.php in core/
tests/ Drupal/ Tests/ Core/ Asset/ CssCollectionOptimizerUnitTest.php
File
- core/
lib/ Drupal/ Core/ Asset/ AssetOptimizerInterface.php, line 8
Namespace
Drupal\Core\AssetView source
interface AssetOptimizerInterface {
/**
* Optimizes an asset.
*
* @param array $asset
* An asset.
*
* @return string
* The optimized asset's contents.
*/
public function optimize(array $asset);
/**
* Removes unwanted content from an asset.
*
* @param string $content
* The content of an asset.
*
* @return string
* The cleaned asset's contents.
*/
public function clean($content);
}