protected function JsMinifier::getFunction in Advanced CSS/JS Aggregation 8.4
Same name and namespace in other branches
- 8.3 advagg_js_minify/src/Asset/JsMinifier.php \Drupal\advagg_js_minify\Asset\JsMinifier::getFunction()
Get the function to use.
Parameters
int $minifier: Configuration value.
Return value
callable the callable to minify the contents.
1 call to JsMinifier::getFunction()
- JsMinifier::optimize in advagg_js_minify/
src/ Asset/ JsMinifier.php - Optimize the asset's content.
File
- advagg_js_minify/
src/ Asset/ JsMinifier.php, line 79
Class
- JsMinifier
- Optimizes a JavaScript asset.
Namespace
Drupal\advagg_js_minify\AssetCode
protected function getFunction($minifier) {
$functions = [
1 => [
$this,
'minifyJsminplus',
],
2 => [
$this,
'minifyJspacker',
],
3 => [
$this,
'minifyJsmin',
],
4 => [
$this,
'minifyJshrink',
],
5 => [
$this,
'minifyJsqueeze',
],
];
return $functions[$minifier];
}