class CssCollectionRendererWrapper
Class CssCollectionRendererWrapper.
Hierarchy
- class \Drupal\webprofiler\Asset\CssCollectionRendererWrapper implements \Drupal\Core\Asset\AssetCollectionRendererInterface
Expanded class hierarchy of CssCollectionRendererWrapper
1 file declares its use of CssCollectionRendererWrapper
- AssetsDataCollectorTest.php in webprofiler/
tests/ src/ Unit/ DataCollector/ AssetsDataCollectorTest.php
1 string reference to 'CssCollectionRendererWrapper'
- webprofiler.services.yml in webprofiler/
webprofiler.services.yml - webprofiler/webprofiler.services.yml
1 service uses CssCollectionRendererWrapper
File
-
webprofiler/
src/ Asset/ CssCollectionRendererWrapper.php, line 11
Namespace
Drupal\webprofiler\AssetView source
class CssCollectionRendererWrapper implements AssetCollectionRendererInterface {
/**
* @var \Drupal\Core\Asset\AssetCollectionRendererInterface
*/
private $assetCollectionRenderer;
/**
* @var \Drupal\webprofiler\DataCollector\AssetsDataCollector
*/
private $dataCollector;
/**
* @param \Drupal\Core\Asset\AssetCollectionRendererInterface $assetCollectionRenderer
* @param \Drupal\webprofiler\DataCollector\AssetsDataCollector $dataCollector
*/
public function __construct(AssetCollectionRendererInterface $assetCollectionRenderer, AssetsDataCollector $dataCollector) {
$this->assetCollectionRenderer = $assetCollectionRenderer;
$this->dataCollector = $dataCollector;
}
/**
* {@inheritdoc}
*/
public function render(array $css_assets) {
$this->dataCollector
->addCssAsset($css_assets);
return $this->assetCollectionRenderer
->render($css_assets);
}
}
Members
Title Sort descending | Modifiers | Object type | Summary |
---|---|---|---|
CssCollectionRendererWrapper::$assetCollectionRenderer | private | property | |
CssCollectionRendererWrapper::$dataCollector | private | property | |
CssCollectionRendererWrapper::render | public | function | |
CssCollectionRendererWrapper::__construct | public | function |