public function SystemManager::getMaxSeverity in Drupal 10
Same name and namespace in other branches
- 8 core/modules/system/src/SystemManager.php \Drupal\system\SystemManager::getMaxSeverity()
- 9 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.
File
- core/
modules/ system/ src/ SystemManager.php, line 133
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;
}