Given a group of files calculate what the aggregate filename will be.

Paramètres

array $groups: An array of CSS/JS groups.

string $type: String; css or js.

Return value

array Files array.

4 calls to advagg_generate_filenames()
advagg_advagg_build_aggregate_plans_alter dans ./advagg.advagg.inc
Implements hook_advagg_build_aggregate_plans_alter().
advagg_build_aggregate_plans dans ./advagg.inc
Replacement for drupal_build_css_cache() and drupal_build_js_cache().
advagg_bundler_advagg_build_aggregate_plans_alter dans advagg_bundler/advagg_bundler.advagg.inc
Implements hook_advagg_build_aggregate_plans_alter().
hook_advagg_build_aggregate_plans_alter dans ./advagg.api.php
Allow modules to modify the aggregate plan.

Fichier

./advagg.inc, line 443

Code

function advagg_generate_filenames(array $groups, $type) {
    $files = array();
    foreach ($groups as $data) {
        foreach ($data as $files_with_meta_data) {
            // Get the aggregate filename and info about each file.
            $aggregate_info = advagg_get_aggregate_info_from_files($type, $files_with_meta_data);
            $values['files'] = $aggregate_info[1];
            $values['aggregate_filenames_hash'] = $aggregate_info[2];
            $values['aggregate_contents_hash'] = $aggregate_info[3];
            // Add information to the files array.
            $files[$aggregate_info[0]] = $values;
        }
    }
    return $files;
}