summaryrefslogtreecommitdiff
path: root/modules/simpletest/tests/drupal_autoload_test/drupal_autoload_test.module
blob: edd5d77cb79ca9b6c41ec4a2b57aa1bbc32d0301 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<?php

/**
 * @file
 * Test module to check code registry.
 */

/**
 * Implements hook_registry_files_alter().
 */
function drupal_autoload_test_registry_files_alter(&$files, $modules) {
  foreach ($modules as $module) {
    // Add the drupal_autoload_test_trait.sh file to the registry when PHP 5.4+
    // is being used.
    if ($module->name == 'drupal_autoload_test' && version_compare(PHP_VERSION, '5.4') >= 0) {
      $files["$module->dir/drupal_autoload_test_trait.sh"] = array(
        'module' => $module->name,
        'weight' => $module->weight,
      );
    }
  }
}