function drupal_requirements_severity
Same name in other branches
- 7.x includes/install.inc \drupal_requirements_severity()
- 8.9.x core/includes/install.inc \drupal_requirements_severity()
- 10 core/includes/install.inc \drupal_requirements_severity()
- 11.x core/includes/install.inc \drupal_requirements_severity()
Extracts the highest severity from the requirements array.
Parameters
$requirements: An array of requirements, in the same format as is returned by hook_requirements().
Return value
int The highest severity in the array.
3 calls to drupal_requirements_severity()
- DbUpdateController::handle in core/
modules/ system/ src/ Controller/ DbUpdateController.php - Returns a database update page.
- drupal_check_module in core/
includes/ install.inc - Checks a module's requirements.
- install_display_requirements in core/
includes/ install.core.inc - Displays installation requirements.
File
-
core/
includes/ install.inc, line 1016
Code
function drupal_requirements_severity(&$requirements) {
$severity = REQUIREMENT_OK;
foreach ($requirements as $requirement) {
if (isset($requirement['severity'])) {
$severity = max($severity, $requirement['severity']);
}
}
return $severity;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.