You are here

public function AssetDumperInterface::dump in Drupal 8

Same name and namespace in other branches
  1. 9 core/lib/Drupal/Core/Asset/AssetDumperInterface.php \Drupal\Core\Asset\AssetDumperInterface::dump()

Dumps an (optimized) asset to persistent storage.

Parameters

string $data: An (optimized) asset's contents.

string $file_extension: The file extension of this asset.

Return value

string An URI to access the dumped asset.

1 method overrides AssetDumperInterface::dump()
AssetDumper::dump in core/lib/Drupal/Core/Asset/AssetDumper.php
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.

File

core/lib/Drupal/Core/Asset/AssetDumperInterface.php, line 21

Class

AssetDumperInterface
Interface defining a service that dumps an (optimized) asset.

Namespace

Drupal\Core\Asset

Code

public function dump($data, $file_extension);