function UpdateScriptTestRequirements::updateAlter

Implements hook_update_requirements_alter().

Attributes

#[Hook('update_requirements_alter')]

File

core/modules/system/tests/modules/update_script_test/src/Hook/UpdateScriptTestRequirements.php, line 53

Class

UpdateScriptTestRequirements
Requirements for the Update Script Test module.

Namespace

Drupal\update_script_test\Hook

Code

public function updateAlter(array &$requirements) : void {
    if (isset($requirements['update_script_test']) && $requirements['update_script_test']['severity'] === RequirementSeverity::Error) {
        $requirements['update_script_test']['description'] = 'This is a requirements error provided by the update_script_test module.';
    }
}

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