You are here

function drupal_requirements_severity in Drupal 7

Same name and namespace in other branches
  1. 8 core/includes/install.inc \drupal_requirements_severity()
  2. 5 includes/install.inc \drupal_requirements_severity()
  3. 6 includes/install.inc \drupal_requirements_severity()
  4. 9 core/includes/install.inc \drupal_requirements_severity()
  5. 10 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.

4 calls to drupal_requirements_severity()
drupal_check_module in includes/install.inc
Checks a module's requirements.
install_verify_requirements in includes/install.core.inc
Verifies the requirements for installing Drupal.
system_status in modules/system/system.admin.inc
Menu callback: displays the site status report. Can also be used as a pure check.
update_check_requirements in ./update.php
Checks update requirements and reports errors and (optionally) warnings.

File

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