function theme_status_report

Returns HTML for the status report.

Parameters

$variables: An associative array containing:

  • requirements: An array of requirements.

Related topics

3 theme calls to theme_status_report()
install_verify_requirements in drupal/core/includes/install.core.inc
Verifies the requirements for installing Drupal.
system_status in drupal/core/modules/system/system.admin.inc
Menu callback: displays the site status report. Can also be used as a pure check.
update_check_requirements in drupal/core/update.php
Checks update requirements and reports errors and (optionally) warnings.

File

drupal/core/modules/system/system.admin.inc, line 2251
Admin page callbacks for the system module.

Code

function theme_status_report($variables) {
  $requirements = $variables['requirements'];
  $severities = array(
    REQUIREMENT_INFO => array(
      'title' => t('Info'),
      'class' => 'info',
    ),
    REQUIREMENT_OK => array(
      'title' => t('OK'),
      'class' => 'ok',
    ),
    REQUIREMENT_WARNING => array(
      'title' => t('Warning'),
      'class' => 'warning',
    ),
    REQUIREMENT_ERROR => array(
      'title' => t('Error'),
      'class' => 'error',
    ),
  );
  $output = '<table class="system-status-report"><tbody>';
  foreach ($requirements as $requirement) {
    if (empty($requirement['#type'])) {

      // 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];
      }
      $severity['icon'] = '<div title="' . $severity['title'] . '"><span class="element-invisible">' . $severity['title'] . '</span></div>';

      // Output table rows.
      $output .= '<tr class="' . $severity['class'] . '">';
      $output .= '<td class="status-icon">' . $severity['icon'] . '</td>';
      $output .= '<td class="status-title">' . $requirement['title'] . '</td>';
      $output .= '<td class="status-value">' . $requirement['value'];
      if (!empty($requirement['description'])) {
        $output .= '<div class="description">' . $requirement['description'] . '</div>';
      }
      $output .= '</td></tr>';
    }
  }
  $output .= '</tbody></table>';
  return $output;
}