Same name and namespace in other branches
  1. 8.x-2.x advagg.api.php \hook_advagg_bundler_analysis_alter() 1 comment

Let other modules modify the analysis array before it is used.

Parameters

array $analysis: An associative array; filename -> data.

See also

advagg_bundler_analysis()

Related topics

1 invocation of hook_advagg_bundler_analysis_alter()
advagg_bundler_analyisis_query in advagg_bundler/advagg_bundler.module
Run the analysis query and return the analysis array.

File

./advagg.api.php, line 683

Code

function hook_advagg_bundler_analysis_alter(array &$analysis) {
    foreach ($analysis as $filename => &$data) {
        if ($filename) {
            // This is the filename.
        }
        // This changes often; 604800 is 1 week.
        if ($data['changes'] > 10 && $data['mtime'] >= REQUEST_TIME - 604800) {
            // Modify the group hash so this doesn't end up in a big aggregate.
            $data['group_hash'];
        }
    }
    unset($data);
}