File: drupal_autoload_test.module

package info (click to toggle)
drupal7 7.52-2%2Bdeb9u11
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 21,756 kB
  • sloc: php: 44,022; pascal: 42,649; javascript: 31,405; sh: 1,685; xml: 466; makefile: 21; sql: 1
file content (22 lines) | stat: -rw-r--r-- 579 bytes parent folder | download | duplicates (2)
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,
      );
    }
  }
}