function module_required_test_system_info_alter

Same name in other branches
  1. 9 core/modules/system/tests/modules/module_required_test/module_required_test.module \module_required_test_system_info_alter()
  2. 10 core/modules/system/tests/modules/module_required_test/module_required_test.module \module_required_test_system_info_alter()
  3. 11.x core/modules/system/tests/modules/module_required_test/module_required_test.module \module_required_test_system_info_alter()

Implements hook_system_info_alter().

Manipulate module dependencies to test dependency chains.

File

core/modules/system/tests/modules/module_required_test/module_required_test.module, line 15

Code

function module_required_test_system_info_alter(&$info, Extension $file, $type) {
    if ($file->getName() == 'module_required_test' && \Drupal::state()->get('module_required_test.hook_system_info_alter')) {
        $info['required'] = TRUE;
        $info['explanation'] = 'Testing hook_system_info_alter()';
    }
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.