You are here

public function CssCollectionRenderer::__construct in Critical CSS 8

Constructs a CssCollectionRenderer.

Parameters

\Drupal\Core\Asset\AssetCollectionRendererInterface $css_collection_renderer: The decorated CSS collection renderer.

\Drupal\Core\Config\ConfigFactoryInterface $config_factory: Config Factory.

\Drupal\Core\Template\TwigEnvironment $twig: The Twig service.

\Drupal\critical_css\Asset\CriticalCssProviderInterface $critical_css_provider: The Critical CSS provider.

File

src/Asset/CssCollectionRenderer.php, line 58

Class

CssCollectionRenderer
Decorates the CSS collection renderer service, adds Critical CSS.

Namespace

Drupal\critical_css\Asset

Code

public function __construct(AssetCollectionRendererInterface $css_collection_renderer, ConfigFactoryInterface $config_factory, TwigEnvironment $twig, CriticalCssProviderInterface $critical_css_provider) {
  $this->cssCollectionRenderer = $css_collection_renderer;
  $this->configFactory = $config_factory;
  $this->twig = $twig;
  $this->criticalCssProvider = $critical_css_provider;
}