You are here

class CssCollectionRendererWrapper in Devel 8.2

Same name and namespace in other branches
  1. 8.3 webprofiler/src/Asset/CssCollectionRendererWrapper.php \Drupal\webprofiler\Asset\CssCollectionRendererWrapper
  2. 8 webprofiler/src/Asset/CssCollectionRendererWrapper.php \Drupal\webprofiler\Asset\CssCollectionRendererWrapper
  3. 4.x webprofiler/src/Asset/CssCollectionRendererWrapper.php \Drupal\webprofiler\Asset\CssCollectionRendererWrapper

Class CssCollectionRendererWrapper.

Hierarchy

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
webprofiler.debug.asset.css.collection_renderer in webprofiler/webprofiler.services.yml
Drupal\webprofiler\Asset\CssCollectionRendererWrapper

File

webprofiler/src/Asset/CssCollectionRendererWrapper.php, line 11

Namespace

Drupal\webprofiler\Asset
View 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