forked from dakala/fullcalendar
-
Notifications
You must be signed in to change notification settings - Fork 0
/
fullcalendar.install
37 lines (32 loc) · 1.2 KB
/
fullcalendar.install
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<?php
/**
* @file
* Install, update and uninstall functions for the FullCalendar module.
*/
use Drupal\Core\Link;
use Drupal\Core\Url;
/**
* Implements hook_requirements().
*/
function fullcalendar_requirements($phase) {
$requirements = array();
if ($phase == 'runtime') {
$path = fullcalendar_get_js_path();
if (!file_exists($path) || version_compare(fullcalendar_get_version($path), FULLCALENDAR_MIN_PLUGIN_VERSION, '<')) {
$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 <a href=":fullcalendar" target="_blank">FullCalendar plugin</a> and extract the entire contents of the archive into the %path folder of your server.', array(':fullcalendar' => '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;
}