You are here

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

Same name and namespace in other branches
  1. 8.4 advagg_mod/src/Asset/DeferCss.php \Drupal\advagg_mod\Asset\DeferCss::__construct()

DeferCss constructor.

Parameters

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

File

advagg_mod/src/Asset/DeferCss.php, line 40

Class

DeferCss
Modify stylesheet links to defer them. May lead to Flash of unstyled content.

Namespace

Drupal\advagg_mod\Asset

Code

public function __construct(ConfigFactoryInterface $config_factory) {
  $this->deferMethod = $config_factory
    ->get('advagg_mod.settings')
    ->get('css_defer_js_code');
  $this->counter = $config_factory
    ->get('advagg.settings')
    ->get('global_counter');
  $this->external = $config_factory
    ->get('advagg_mod.settings')
    ->get('css_defer_external');
}