function drupal_requirements_severity in Zircon Profile 8
Same name and namespace in other branches
- 8.0 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
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 966 - API functions for installing modules and themes.
Code
function drupal_requirements_severity(&$requirements) {
$severity = REQUIREMENT_OK;
foreach ($requirements as $requirement) {
if (isset($requirement['severity'])) {
$severity = max($severity, $requirement['severity']);
}
}
return $severity;
}