function lockr_preprocess_status_report in Lockr 8.2
Same name and namespace in other branches
- 8.4 src/Controller/LockrAdminController.php \Drupal\lockr\Controller\lockr_preprocess_status_report()
- 8.3 src/Controller/LockrAdminController.php \Drupal\lockr\Controller\lockr_preprocess_status_report()
- 4.x src/Controller/LockrAdminController.php \Drupal\lockr\Controller\lockr_preprocess_status_report()
1 call to lockr_preprocess_status_report()
- LockrAdminController::getStatus in src/
Controller/ LockrAdminController.php
File
- src/
Controller/ LockrAdminController.php, line 207
Namespace
Drupal\lockr\ControllerCode
function lockr_preprocess_status_report(&$reqs) {
$severities = array(
REQUIREMENT_INFO => array(
'title' => t('Info'),
'status' => 'info',
),
REQUIREMENT_OK => array(
'title' => t('OK'),
'status' => 'ok',
),
REQUIREMENT_WARNING => array(
'title' => t('Warning'),
'status' => 'warning',
),
REQUIREMENT_ERROR => array(
'title' => t('Error'),
'status' => 'error',
),
);
foreach ($reqs as $i => $requirement) {
// Always use the explicit requirement severity, if defined. Otherwise,
// default to REQUIREMENT_OK in the installer to visually confirm that
// installation requirements are met. And default to REQUIREMENT_INFO to
// denote neutral information without special visualization.
if (isset($requirement['severity'])) {
$severity = $severities[(int) $requirement['severity']];
}
elseif (defined('MAINTENANCE_MODE') && MAINTENANCE_MODE == 'install') {
$severity = $severities[REQUIREMENT_OK];
}
else {
$severity = $severities[REQUIREMENT_INFO];
}
$reqs[$i]['severity_title'] = $severity['title'];
$reqs[$i]['severity_status'] = $severity['status'];
}
}