Drupal 8  8.0.2
JsCollectionRenderer Class Reference
Inheritance diagram for JsCollectionRenderer:

Public Member Functions

 __construct (StateInterface $state)
 
 render (array $js_assets)
 

Protected Attributes

 $state
 

Detailed Description

Renders JavaScript assets.

Constructor & Destructor Documentation

__construct ( StateInterface  $state)

Constructs a JsCollectionRenderer.

Parameters
\Drupal\Core\State\StateInterfaceThe state key/value store.

References Drupal\state().

Here is the call graph for this function:

Member Function Documentation

render ( array  $js_assets)

{Renders an asset collection.

Parameters
array$assetsAn asset collection.
Returns
array A render array to render the asset collection.
}

This class evaluates the aggregation enabled/disabled condition on a group by group basis by testing whether an aggregate file has been made for the group rather than by testing the site-wide aggregation setting. This allows this class to work correctly even if modules have implemented custom logic for grouping and aggregating files.

Implements AssetCollectionRendererInterface.

References Json\encode(), file_create_url(), and Drupal\state().

Here is the call graph for this function:


The documentation for this class was generated from the following file: