function experimental_module_requirements_test_requirements
Same name in other branches
- 8.9.x core/modules/system/tests/modules/experimental_module_requirements_test/experimental_module_requirements_test.install \experimental_module_requirements_test_requirements()
- 10 core/modules/system/tests/modules/experimental_module_requirements_test/experimental_module_requirements_test.install \experimental_module_requirements_test_requirements()
- 11.x core/modules/system/tests/modules/experimental_module_requirements_test/experimental_module_requirements_test.install \experimental_module_requirements_test_requirements()
Implements hook_requirements().
1 string reference to 'experimental_module_requirements_test_requirements'
- NonStableModulesTest::testExperimentalConfirmForm in core/
modules/ system/ tests/ src/ Functional/ Module/ NonStableModulesTest.php - Tests installing experimental modules and dependencies in the UI.
File
-
core/
modules/ system/ tests/ modules/ experimental_module_requirements_test/ experimental_module_requirements_test.install, line 11
Code
function experimental_module_requirements_test_requirements() {
$requirements = [];
if (\Drupal::state()->get('experimental_module_requirements_test_requirements', FALSE)) {
$requirements['experimental_module_requirements_test_requirements'] = [
'severity' => REQUIREMENT_ERROR,
'description' => t('The Experimental Test Requirements module can not be installed.'),
];
}
return $requirements;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.