Generate a hash for a given group of CSS assets.
Parameters
array $css_group: A group of CSS assets.
Return value
string A hash to uniquely identify the given group of CSS assets.
1 call to CssCollectionOptimizer::generateHash()
File
-
src/
Asset/ CssCollectionOptimizer.php, line 227
Class
Namespace
Drupal\advagg\AssetCode
protected function generateHash(array $css_group) {
$css_data = [];
foreach ($css_group['items'] as $css_file) {
$css_data[] = $css_file['data'];
$css_data[] = filemtime($css_file['data']);
}
return hash('sha256', serialize($css_data));
}