1.14.x install.inc backdrop_requirements_severity(&$requirements)
1.12.x install.inc backdrop_requirements_severity(&$requirements)
1.10.x install.inc backdrop_requirements_severity(&$requirements)
1.11.x install.inc backdrop_requirements_severity(&$requirements)
1.13.x install.inc backdrop_requirements_severity(&$requirements)
1.7.x install.inc backdrop_requirements_severity(&$requirements)
1.8.x install.inc backdrop_requirements_severity(&$requirements)
1.9.x 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

system_get_requirements().

File

includes/install.inc, line 1299
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;
}