function theme_prod_check_status_report in Production check & Production monitor 6
Same name and namespace in other branches
- 7 includes/prod_check.theme.inc \theme_prod_check_status_report()
Theme requirements status report.
Parameters
$requirements: An array of requirements.
1 theme call to theme_prod_check_status_report()
- prod_check_status in includes/
prod_check.admin.inc - Build status page.
File
- includes/
prod_check.theme.inc, line 10
Code
function theme_prod_check_status_report($requirements) {
$i = 0;
$output = '<table class="system-status-report">';
foreach ($requirements as $requirement) {
if (empty($requirement['#type'])) {
$class = ++$i % 2 == 0 ? 'even' : 'odd';
$classes = array(
PROD_CHECK_REQUIREMENT_INFO => 'info',
PROD_CHECK_REQUIREMENT_OK => 'ok',
PROD_CHECK_REQUIREMENT_WARNING => 'warning',
PROD_CHECK_REQUIREMENT_ERROR => 'error',
);
$class = $classes[isset($requirement['severity']) ? (int) $requirement['severity'] : 0] . ' ' . $class;
// Output table row(s)
if (!empty($requirement['description'])) {
$output .= '<tr class="' . $class . ' merge-down"><th>' . $requirement['title'] . '</th><td>' . $requirement['value'] . '</td></tr>';
$output .= '<tr class="' . $class . ' merge-up"><td colspan="2">' . $requirement['description'] . '</td></tr>';
}
else {
$output .= '<tr class="' . $class . '"><th>' . $requirement['title'] . '</th><td>' . $requirement['value'] . '</td></tr>';
}
}
}
$output .= '</table>';
return $output;
}