You are here

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

Same name and namespace in other branches
  1. 8.4 advagg_mod/src/EventSubscriber/InitSubscriber.php \Drupal\advagg_mod\EventSubscriber\InitSubscriber::__construct()
  2. 8.2 advagg_mod/src/EventSubscriber/InitSubscriber.php \Drupal\advagg_mod\EventSubscriber\InitSubscriber::__construct()

Constructs the Subscriber object.

Parameters

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

\Drupal\advagg_mod\Asset\TranslateCss $translator: The translator service.

\Drupal\advagg_mod\Asset\DeferCss $deferer: The CSS deferer.

\Drupal\Advagg_mod\Asset\AsyncJs $js_asyncer: The JS asyncer.

\Drupal\advagg_mod\Asset\DeferJs $js_deferer: The JS deferer.

\Drupal\Advagg_mod\Asset\RemoveConsoleLog $js_console_log: The class to remove console.log() calls.

File

advagg_mod/src/EventSubscriber/InitSubscriber.php, line 87

Class

InitSubscriber
Perform initialization tasks for advagg_mod.

Namespace

Drupal\advagg_mod\EventSubscriber

Code

public function __construct(ConfigFactoryInterface $config_factory, TranslateCss $translator, DeferCss $deferer, AsyncJs $js_asyncer, DeferJs $js_deferer, RemoveConsoleLog $js_console_log) {
  $this->config = $config_factory
    ->getEditable('advagg_mod.settings');
  $this->advaggConfig = $config_factory
    ->getEditable('advagg.settings');
  $this->translator = $translator;
  $this->cssDeferer = $deferer;
  $this->jsAsyncer = $js_asyncer;
  $this->jsDeferer = $js_deferer;
  $this->consoleLogRemover = $js_console_log;
}