Allow other modules to modify the contents of individual JavaScript files.
Called once per file at aggregation time.
Paramètres
string $contents: Raw file data.
array $js_asset: Asset array.
Voir aussi
\Drupal\advagg\Asset\JsCollectionOptimizer::optimize()
Sujets associés
1 invocation of hook_advagg_js_contents_alter()
- JsCollectionOptimizer::optimize dans src/
Asset/ JsCollectionOptimizer.php
Fichier
-
./
advagg.api.php, line 119
Code
function hook_advagg_js_contents_alter(&$contents, array $js_asset) {
if ($js_asset['data'] == 'modules/advagg/advagg.admin.js') {
$contents = str_replace('AdvAgg Bypass Cookie Removed', 'Advanced Aggregates Cookie Removed', $contents);
}
}