You are here

public function MinificationSubscriber::__construct in Advanced CSS/JS Aggregation 8.3

Same name in this branch
  1. 8.3 advagg_ext_minify/src/EventSubscriber/MinificationSubscriber.php \Drupal\advagg_ext_minify\EventSubscriber\MinificationSubscriber::__construct()
  2. 8.3 advagg_css_minify/src/EventSubscriber/MinificationSubscriber.php \Drupal\advagg_css_minify\EventSubscriber\MinificationSubscriber::__construct()
  3. 8.3 advagg_js_minify/src/EventSubscriber/MinificationSubscriber.php \Drupal\advagg_js_minify\EventSubscriber\MinificationSubscriber::__construct()
  4. 8.3 advagg_bundler/src/EventSubscriber/MinificationSubscriber.php \Drupal\advagg_js_minify\EventSubscriber\MinificationSubscriber::__construct()
Same name and namespace in other branches
  1. 8.4 advagg_ext_minify/src/EventSubscriber/MinificationSubscriber.php \Drupal\advagg_ext_minify\EventSubscriber\MinificationSubscriber::__construct()

Construct the optimizer instance.

Parameters

\Drupal\advagg\Asset\SingleAssetOptimizerBase $minifier: The minifier.

\Drupal\Core\Config\ConfigFactoryInterface $config_factory: The config factory.

File

advagg_ext_minify/src/EventSubscriber/MinificationSubscriber.php, line 37

Class

MinificationSubscriber
Subscribe to asset optimization events and minify assets.

Namespace

Drupal\advagg_ext_minify\EventSubscriber

Code

public function __construct(SingleAssetOptimizerBase $minifier, ConfigFactoryInterface $config_factory) {
  $this->minifier = $minifier;
  $this->config = $config_factory
    ->get('advagg_ext_minify.settings');
}