Same name in other branches
  1. 5.0.x src/Asset/AssetOptimizer.php \Drupal\advagg\Asset\AssetOptimizer::optimizeFile()
  2. 6.0.x src/Asset/AssetOptimizer.php \Drupal\advagg\Asset\AssetOptimizer::optimizeFile()
  3. 8.x-3.x src/Asset/AssetOptimizer.php \Drupal\advagg\Asset\AssetOptimizer::optimizeFile()

Perform any in-place optimization & pass to event for further optimization.

Paramètres

array $asset: Core single asset definition array.

array $data: An array of extra file information (hashes, modification time etc).

Return value

bool|string False if contents unchanged or the new file path if optimized.

1 call to AssetOptimizer::optimizeFile()
AssetOptimizer::scanFile dans src/Asset/AssetOptimizer.php
Given a filename calculate various hashes, gather meta data then optimize.
2 methods override AssetOptimizer::optimizeFile()
CssOptimizer::optimizeFile dans src/Asset/CssOptimizer.php
Perform any in-place optimization & pass to event for further optimization.
JsOptimizer::optimizeFile dans src/Asset/JsOptimizer.php
Perform any in-place optimization & pass to event for further optimization.

Fichier

src/Asset/AssetOptimizer.php, line 377

Classe

AssetOptimizer
Defines the base AdvAgg optimizer.

Namespace

Drupal\advagg\Asset

Code

protected abstract function optimizeFile(array &$asset, array $data);