function AssetCollectionOptimizerInterface::optimize

Same name in other branches
  1. 9 core/lib/Drupal/Core/Asset/AssetCollectionOptimizerInterface.php \Drupal\Core\Asset\AssetCollectionOptimizerInterface::optimize()
  2. 8.9.x core/lib/Drupal/Core/Asset/AssetCollectionOptimizerInterface.php \Drupal\Core\Asset\AssetCollectionOptimizerInterface::optimize()
  3. 10 core/lib/Drupal/Core/Asset/AssetCollectionOptimizerInterface.php \Drupal\Core\Asset\AssetCollectionOptimizerInterface::optimize()

Optimizes a collection of assets.

Parameters

array $assets: An asset collection.

array $libraries: An array of library names.

Return value

array An optimized asset collection.

2 methods override AssetCollectionOptimizerInterface::optimize()
CssCollectionOptimizerLazy::optimize in core/lib/Drupal/Core/Asset/CssCollectionOptimizerLazy.php
Optimizes a collection of assets.
JsCollectionOptimizerLazy::optimize in core/lib/Drupal/Core/Asset/JsCollectionOptimizerLazy.php
Optimizes a collection of assets.

File

core/lib/Drupal/Core/Asset/AssetCollectionOptimizerInterface.php, line 21

Class

AssetCollectionOptimizerInterface
Interface defining a service that optimizes a collection of assets.

Namespace

Drupal\Core\Asset

Code

public function optimize(array $assets, array $libraries);

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.