drupal_autoload_test.module 579 B

12345678910111213141516171819202122
  1. <?php
  2. /**
  3. * @file
  4. * Test module to check code registry.
  5. */
  6. /**
  7. * Implements hook_registry_files_alter().
  8. */
  9. function drupal_autoload_test_registry_files_alter(&$files, $modules) {
  10. foreach ($modules as $module) {
  11. // Add the drupal_autoload_test_trait.sh file to the registry when PHP 5.4+
  12. // is being used.
  13. if ($module->name == 'drupal_autoload_test' && version_compare(PHP_VERSION, '5.4') >= 0) {
  14. $files["$module->dir/drupal_autoload_test_trait.sh"] = array(
  15. 'module' => $module->name,
  16. 'weight' => $module->weight,
  17. );
  18. }
  19. }
  20. }