You are here

function perfmon_requirements in Performance monitor 7

Implements hook_requirements().

File

./perfmon.install, line 79
Install, update and uninstall functions for the perfmon module.

Code

function perfmon_requirements($phase) {
  $requirements = array();
  switch ($phase) {
    case 'runtime':
      $checks = perfmon_get_stored_results();
      $t = get_t();
      $url = url('admin/reports/perfmon');
      if (empty($checks)) {
        $severity = REQUIREMENT_WARNING;
        $value = $t('The Performance monitor testlist has not been run. <a href="!url">Run the checklist</a>', array(
          '!url' => $url,
        ));
        $requirements['perfmon'] = array(
          'title' => $t('Performance Monitor'),
          'severity' => $severity,
          'value' => $value,
        );
      }
      break;
  }
  return $requirements;
}