Drupal 8  8.0.2
AssetDumper Class Reference
Inheritance diagram for AssetDumper:

Public Member Functions

 dump ($data, $file_extension)

Detailed Description

Dumps a CSS or JavaScript asset.

Member Function Documentation

dump (   $data,

{Dumps an (optimized) asset to persistent storage.

string$dataAn (optimized) asset's contents.
string$file_extensionThe file extension of this asset.
string An URI to access the dumped asset.

The file name for the CSS or JS cache file is generated from the hash of the aggregated contents of the files in $data. This forces proxies and browsers to download new CSS when the CSS changes.

Implements AssetDumperInterface.

References Drupal\config(), FILE_CREATE_DIRECTORY, FILE_EXISTS_REPLACE, file_prepare_directory(), file_unmanaged_save_data(), and Crypt\hashBase64().

Here is the call graph for this function:

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