You are here

function variablecheck_requirements in Variable Check 6

Same name and namespace in other branches
  1. 7 variablecheck.module \variablecheck_requirements()

Implementation of hook_requirements()

File

./variablecheck.module, line 25

Code

function variablecheck_requirements($phase) {
  $problem = count(variablecheck_check_variables());
  $requirements = array();
  $requirements['valiablecheck'] = array(
    'title' => 'Variables',
    'value' => $problem ? format_plural($problem, 'Found one invalid entry', 'Found @count invalid entries') : t('No problem'),
    'description' => $problem ? t('The variable table contains an invalid entry. Please check the <a href="@url">variable report</a> for more information.', array(
      '@url' => url('admin/reports/variablecheck'),
    )) : '',
    'severity' => $problem ? REQUIREMENT_WARNING : REQUIREMENT_OK,
  );
  return $requirements;
}