function AssetCollectionOptimizerInterface::optimize
Same name in other branches
- 9 core/lib/Drupal/Core/Asset/AssetCollectionOptimizerInterface.php \Drupal\Core\Asset\AssetCollectionOptimizerInterface::optimize()
- 10 core/lib/Drupal/Core/Asset/AssetCollectionOptimizerInterface.php \Drupal\Core\Asset\AssetCollectionOptimizerInterface::optimize()
- 11.x core/lib/Drupal/Core/Asset/AssetCollectionOptimizerInterface.php \Drupal\Core\Asset\AssetCollectionOptimizerInterface::optimize()
Optimizes a collection of assets.
Parameters
array $assets: An asset collection.
Return value
array An optimized asset collection.
2 methods override AssetCollectionOptimizerInterface::optimize()
- CssCollectionOptimizer::optimize in core/
lib/ Drupal/ Core/ Asset/ CssCollectionOptimizer.php - The cache file name is retrieved on a page load via a lookup variable that contains an associative array. The array key is the hash of the file names in $css while the value is the cache file name. The cache file is generated in two cases. First, if…
- JsCollectionOptimizer::optimize in core/
lib/ Drupal/ Core/ Asset/ JsCollectionOptimizer.php - The cache file name is retrieved on a page load via a lookup variable that contains an associative array. The array key is the hash of the names in $files while the value is the cache file name. The cache file is generated in two cases. First, if…
File
-
core/
lib/ Drupal/ Core/ Asset/ AssetCollectionOptimizerInterface.php, line 19
Class
- AssetCollectionOptimizerInterface
- Interface defining a service that optimizes a collection of assets.
Namespace
Drupal\Core\AssetCode
public function optimize(array $assets);
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.