You are here

function forena_requirements in Forena Reports 7.2

Same name and namespace in other branches
  1. 8 forena.module \forena_requirements()
  2. 7.5 forena.module \forena_requirements()
  3. 7.4 forena.module \forena_requirements()

Implements hook_requirements().

File

./forena.install, line 68
Installation api for module

Code

function forena_requirements($phase) {
  $requirements = array();
  if ($phase == 'runtime') {
    $settings_initialized = variable_get('forena_report_repos', FALSE) !== FALSE;
    if ($settings_initialized) {
      $requirements['forena'] = array(
        'value' => t('Configured'),
        'severity' => REQUIREMENT_OK,
      );
    }
    else {
      $requirements['forena'] = array(
        'value' => t('Not configured'),
        'description' => t('Before using Forena please visit !link, verify and save the settings.', array(
          '!link' => l('configuration page', 'admin/config/content/forena'),
        )),
        'severity' => REQUIREMENT_ERROR,
      );
    }
    $requirements['forena']['title'] = t('Forena Reports module');
  }
  return $requirements;
}