Generate a hash for a given group of CSS assets.

Paramètres

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()
CssCollectionOptimizer::optimize dans src/Asset/CssCollectionOptimizer.php

Fichier

src/Asset/CssCollectionOptimizer.php, line 227

Classe

CssCollectionOptimizer

Namespace

Drupal\advagg\Asset

Code

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));
}