You are here

function fullcalendar_requirements in FullCalendar 7

Same name and namespace in other branches
  1. 8.5 fullcalendar.install \fullcalendar_requirements()
  2. 8 fullcalendar.install \fullcalendar_requirements()
  3. 8.2 fullcalendar.install \fullcalendar_requirements()
  4. 8.3 fullcalendar.install \fullcalendar_requirements()
  5. 8.4 fullcalendar.install \fullcalendar_requirements()
  6. 6.2 fullcalendar.install \fullcalendar_requirements()
  7. 6 fullcalendar.install \fullcalendar_requirements()
  8. 7.2 fullcalendar.install \fullcalendar_requirements()

Implements of hook_requirements().

File

./fullcalendar.install, line 11
Install, update and uninstall functions for the fullcalendar module.

Code

function fullcalendar_requirements($phase) {
  $requirements = array();
  if ($phase == 'runtime') {
    $t = get_t();
    $status = _fullcalendar_status();
    if (!$status['fullcalendar_plugin']) {
      $requirements['fullcalendar_plugin'] = array(
        'title' => $t('FullCalendar plugin'),
        'value' => $t('At least @a', array(
          '@a' => FULLCALENDAR_MIN_PLUGIN_VERSION,
        )),
        'severity' => REQUIREMENT_ERROR,
        'description' => $t('You need to download the !fullcalendar and extract the entire contents of the archive into the %path folder of your server.', array(
          '!fullcalendar' => l(t('FullCalendar plugin'), 'http://arshaw.com/fullcalendar/download'),
          '%path' => 'sites/all/libraries',
        )),
      );
    }
    else {
      $requirements['fullcalendar_plugin'] = array(
        'title' => $t('FullCalendar plugin'),
        'severity' => REQUIREMENT_OK,
        'value' => fullcalendar_get_version(),
      );
    }
  }
  return $requirements;
}