module_required_test.module in Drupal 10
Same filename and directory in other branches
Test module.
File
core/modules/system/tests/modules/module_required_test/module_required_test.moduleView source
<?php
/**
* @file
* Test module.
*/
use Drupal\Core\Extension\Extension;
/**
* Implements hook_system_info_alter().
*
* Manipulate module dependencies to test dependency chains.
*/
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()';
}
}
Functions
Name | Description |
---|---|
module_required_test_system_info_alter | Implements hook_system_info_alter(). |