Same name in other branches
  1. 5.0.x src/Asset/JsOptimizer.php \Drupal\advagg\Asset\JsOptimizer::__construct()
  2. 6.0.x src/Asset/JsOptimizer.php \Drupal\advagg\Asset\JsOptimizer::__construct()
  3. 8.x-3.x src/Asset/JsOptimizer.php \Drupal\advagg\Asset\JsOptimizer::__construct()
  4. 8.x-4.x src/Asset/JsOptimizer.php \Drupal\advagg\Asset\JsOptimizer::__construct()

Construct the optimizer instance.

Parameters

\Drupal\Core\Cache\CacheBackendInterface $minify_cache: The minify cache.

\Drupal\Core\Config\ConfigFactoryInterface $config_factory: A config factory for retrieving required config objects.

\Drupal\Core\State\StateInterface $advagg_files: The AdvAgg file status state information storage service.

\Drupal\Core\Extension\ModuleHandlerInterface $module_handler: The module handler.

\Psr\Log\LoggerInterface $logger: The logger service.

File

advagg_js_minify/src/Asset/JsOptimizer.php, line 74

Class

JsOptimizer
Optimizes a JavaScript asset.

Namespace

Drupal\advagg_js_minify\Asset

Code

public function __construct(CacheBackendInterface $minify_cache, ConfigFactoryInterface $config_factory, StateInterface $advagg_files, ModuleHandlerInterface $module_handler, LoggerInterface $logger) {
    $this->cache = $minify_cache;
    $this->config = $config_factory->get('advagg_js_minify.settings');
    $this->advaggConfig = $config_factory->get('advagg.settings');
    $this->advaggFiles = $advagg_files;
    $this->moduleHandler = $module_handler;
    $this->logger = $logger;
}