1 install.inc | backdrop_requirements_severity(&$requirements) |
Extracts the highest severity from the requirements array.
Parameters
$requirements: An array of requirements as returned by system_get_requirements().
Return value
The highest severity in the array.:
See also
File
- core/
includes/ install.inc, line 1416 - API functions for installing modules and themes.
Code
function backdrop_requirements_severity(&$requirements) {
$severity = REQUIREMENT_OK;
foreach ($requirements as $requirement) {
if (isset($requirement['severity'])) {
$severity = max($severity, $requirement['severity']);
}
}
return $severity;
}