Same name in other branches
- 5.0.x advagg_ext_minify/src/EventSubscriber/MinificationSubscriber.php \Drupal\advagg_ext_minify\EventSubscriber\MinificationSubscriber::isEnabled()
- 8.x-3.x advagg_ext_minify/src/EventSubscriber/MinificationSubscriber.php \Drupal\advagg_ext_minify\EventSubscriber\MinificationSubscriber::isEnabled()
- 8.x-4.x advagg_ext_minify/src/EventSubscriber/MinificationSubscriber.php \Drupal\advagg_ext_minify\EventSubscriber\MinificationSubscriber::isEnabled()
Check if the external minifier is enabled & configured for this asset type.
Parameters
string $type: The asset type.
Return value
bool Whether to run the external minifier or not.
2 calls to MinificationSubscriber::isEnabled()
- MinificationSubscriber::minifyCss in advagg_ext_minify/
src/ EventSubscriber/ MinificationSubscriber.php - Pass the minification over to the minification service.
- MinificationSubscriber::minifyJs in advagg_ext_minify/
src/ EventSubscriber/ MinificationSubscriber.php - Pass the minification over to the minification service.
File
-
advagg_ext_minify/
src/ EventSubscriber/ MinificationSubscriber.php, line 91
Class
- MinificationSubscriber
- Subscribe to asset optimization events and minify assets.
Namespace
Drupal\advagg_ext_minify\EventSubscriberCode
protected function isEnabled($type) {
if (!$this->config
->get("{$type}_enabled")) {
return FALSE;
}
if (!$this->config
->get("{$type}_cmd")) {
return FALSE;
}
return TRUE;
}