-
Notifications
You must be signed in to change notification settings - Fork 9
/
fullcalendar.install
38 lines (33 loc) · 1.19 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
38
<?php
/**
* @file
* Install, update and uninstall functions for the FullCalendar module.
*/
/**
* Implements hook_requirements().
*/
function fullcalendar_requirements($phase) {
$requirements = [];
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'] = [
'title' => t('FullCalendar plugin'),
'value' => t('At least @a', ['@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.', [
':fullcalendar' => 'http://arshaw.com/fullcalendar/download',
'%path' => '/libraries',
]),
];
}
else {
$requirements['fullcalendar_plugin'] = [
'title' => t('FullCalendar plugin'),
'severity' => REQUIREMENT_OK,
'value' => fullcalendar_get_version(),
];
}
}
return $requirements;
}