class JsCollectionRendererWrapper
Class JsCollectionRendererWrapper.
Hierarchy
- class \Drupal\webprofiler\Asset\JsCollectionRendererWrapper implements \Drupal\Core\Asset\AssetCollectionRendererInterface
Expanded class hierarchy of JsCollectionRendererWrapper
1 string reference to 'JsCollectionRendererWrapper'
- webprofiler.services.yml in webprofiler/
webprofiler.services.yml - webprofiler/webprofiler.services.yml
1 service uses JsCollectionRendererWrapper
File
-
webprofiler/
src/ Asset/ JsCollectionRendererWrapper.php, line 11
Namespace
Drupal\webprofiler\AssetView source
class JsCollectionRendererWrapper 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 $js_assets) {
$this->dataCollector
->addJsAsset($js_assets);
return $this->assetCollectionRenderer
->render($js_assets);
}
}
Members
Title Sort descending | Modifiers | Object type | Summary |
---|---|---|---|
JsCollectionRendererWrapper::$assetCollectionRenderer | private | property | |
JsCollectionRendererWrapper::$dataCollector | private | property | |
JsCollectionRendererWrapper::render | public | function | |
JsCollectionRendererWrapper::__construct | public | function |