function locale_test_system_info_alter in Zircon Profile 8.0
Same name and namespace in other branches
- 8 core/modules/locale/tests/modules/locale_test/locale_test.module \locale_test_system_info_alter()
Implements hook_system_info_alter().
Make the test scripts to be believe this is not a hidden test module, but a regular custom module.
File
- core/
modules/ locale/ tests/ modules/ locale_test/ locale_test.module, line 17 - Simulate a custom module with a local po file.
Code
function locale_test_system_info_alter(&$info, Extension $file, $type) {
// Only modify the system info if required.
// By default the locale_test modules are hidden and have a project specified.
// To test the module detection process by locale_project_list() the
// test modules should mimic a custom module. I.e. be non-hidden.
if (\Drupal::state()
->get('locale.test_system_info_alter')) {
if ($file
->getName() == 'locale_test' || $file
->getName() == 'locale_test_translate') {
// Don't hide the module.
$info['hidden'] = FALSE;
}
}
}