You are here

abstract protected function AssetOptimizer::optimizeFile in Advanced CSS/JS Aggregation 8.4

Same name and namespace in other branches
  1. 8.3 src/Asset/AssetOptimizer.php \Drupal\advagg\Asset\AssetOptimizer::optimizeFile()

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

Parameters

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 in src/Asset/AssetOptimizer.php
Given a filename calculate various hashes, gather meta data then optimize.
2 methods override AssetOptimizer::optimizeFile()
CssOptimizer::optimizeFile in src/Asset/CssOptimizer.php
Perform any in-place optimization & pass to event for further optimization.
JsOptimizer::optimizeFile in src/Asset/JsOptimizer.php
Perform any in-place optimization & pass to event for further optimization.

File

src/Asset/AssetOptimizer.php, line 377

Class

AssetOptimizer
Defines the base AdvAgg optimizer.

Namespace

Drupal\advagg\Asset

Code

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