function AssetOptimizerInterface::optimize
Same name in other branches
- 9 core/lib/Drupal/Core/Asset/AssetOptimizerInterface.php \Drupal\Core\Asset\AssetOptimizerInterface::optimize()
- 8.9.x core/lib/Drupal/Core/Asset/AssetOptimizerInterface.php \Drupal\Core\Asset\AssetOptimizerInterface::optimize()
- 10 core/lib/Drupal/Core/Asset/AssetOptimizerInterface.php \Drupal\Core\Asset\AssetOptimizerInterface::optimize()
Optimizes an asset.
Parameters
array $asset: An asset.
Return value
string The optimized asset's contents.
2 methods override AssetOptimizerInterface::optimize()
- CssOptimizer::optimize in core/
lib/ Drupal/ Core/ Asset/ CssOptimizer.php - Optimizes an asset.
- JsOptimizer::optimize in core/
lib/ Drupal/ Core/ Asset/ JsOptimizer.php - Optimizes an asset.
File
-
core/
lib/ Drupal/ Core/ Asset/ AssetOptimizerInterface.php, line 19
Class
- AssetOptimizerInterface
- Interface defining a service that optimizes an asset.
Namespace
Drupal\Core\AssetCode
public function optimize(array $asset);
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.