public function SystemManager::getMaxSeverity in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/system/src/SystemManager.php \Drupal\system\SystemManager::getMaxSeverity()
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.
1 call to SystemManager::getMaxSeverity()
- SystemManager::checkRequirements in core/
modules/ system/ src/ SystemManager.php - Checks for requirement severity.
File
- core/
modules/ system/ src/ SystemManager.php, line 140 - Contains \Drupal\system\SystemManager.
Class
- SystemManager
- System Manager Service.
Namespace
Drupal\systemCode
public function getMaxSeverity(&$requirements) {
$severity = static::REQUIREMENT_OK;
foreach ($requirements as $requirement) {
if (isset($requirement['severity'])) {
$severity = max($severity, $requirement['severity']);
}
}
return $severity;
}