function drupal_requirements_severity

Same name in other branches
  1. 9 core/includes/install.inc \drupal_requirements_severity()
  2. 8.9.x core/includes/install.inc \drupal_requirements_severity()
  3. 10 core/includes/install.inc \drupal_requirements_severity()
  4. 11.x 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 1211

Code

function drupal_requirements_severity(&$requirements) {
    $severity = REQUIREMENT_OK;
    foreach ($requirements as $requirement) {
        if (isset($requirement['severity'])) {
            $severity = max($severity, $requirement['severity']);
        }
    }
    return $severity;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.