1 system_test.module system_test_system_info_alter(&$info, $file, $type)

Implements hook_system_info_alter().

File

core/modules/simpletest/tests/system_test.module, line 344
Test module for system functions.

Code

function system_test_system_info_alter(&$info, $file, $type) {
  if ($dependency = state_get('system_test_dependency')) {
    if ($file->name == 'module_test') {
      $info['hidden'] = FALSE;
      $info['dependencies'][] = $dependency;
    }
    if ($file->name == 'common_test') {
      $info['hidden'] = FALSE;
      $info['version'] = '1.x-2.4.5-beta3';
    }
  }

  if ($dev_dependency = state_get('system_test_dev_dependency')) {
    if ($file->name == 'module_test') {
      $info['hidden'] = FALSE;
      $info['dependencies'][] = $dev_dependency;
    }
    if ($file->name == 'common_test') {
      $info['hidden'] = FALSE;
      $info['version'] = '1.x-2.x-dev';
    }
  }

  if ($file->name == 'system_project_namespace_test') {
    $info['hidden'] = FALSE;
  }
  // Make the system_dependencies_test visible by default.
  if ($file->name == 'system_dependencies_test') {
    $info['hidden'] = FALSE;
  }
  if (in_array($file->name, array(
    'system_incompatible_module_version_dependencies_test',
    'system_incompatible_core_version_dependencies_test',
    'system_incompatible_module_version_test',
    'system_incompatible_core_version_test',
  ))) {
    $info['hidden'] = FALSE;
  }
  if ($file->name == 'requirements1_test' || $file->name == 'requirements2_test') {
    $info['hidden'] = FALSE;
  }
}