function CssCollectionRenderer::__construct
Same name in other branches
- 8.9.x core/lib/Drupal/Core/Asset/CssCollectionRenderer.php \Drupal\Core\Asset\CssCollectionRenderer::__construct()
- 10 core/lib/Drupal/Core/Asset/CssCollectionRenderer.php \Drupal\Core\Asset\CssCollectionRenderer::__construct()
- 11.x core/lib/Drupal/Core/Asset/CssCollectionRenderer.php \Drupal\Core\Asset\CssCollectionRenderer::__construct()
Constructs a CssCollectionRenderer.
Parameters
\Drupal\Core\State\StateInterface $state: The state key/value store.
\Drupal\Core\File\FileUrlGeneratorInterface $file_url_generator: The file URL generator.
File
-
core/
lib/ Drupal/ Core/ Asset/ CssCollectionRenderer.php, line 35
Class
- CssCollectionRenderer
- Renders CSS assets.
Namespace
Drupal\Core\AssetCode
public function __construct(StateInterface $state, FileUrlGeneratorInterface $file_url_generator = NULL) {
$this->state = $state;
if (!$file_url_generator) {
@trigger_error('Calling CssCollectionRenderer::__construct() without the $file_url_generator argument is deprecated in drupal:9.3.0 and will be required before drupal:10.0.0. See https://www.drupal.org/node/2549139.', E_USER_DEPRECATED);
$file_url_generator = \Drupal::service('file_url_generator');
}
$this->fileUrlGenerator = $file_url_generator;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.