drupal_requirements_severity

drupal_requirements_severity(&$requirements)

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.

File

core/includes/install.inc, line 975
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;
}
doc_Drupal
2016-10-29 09:03:19
Comments
Leave a Comment

Please login to continue.