function rooms_requirements in Rooms - Drupal Booking for Hotels, B&Bs and Vacation Rentals 7
Implements hook_requirements().
File
- ./
rooms.install, line 46 - Install, update and uninstall functions for the rooms module.
Code
function rooms_requirements($phase) {
$requirements = array();
$t = get_t();
switch ($phase) {
case 'runtime':
if (!rooms_library_loaded('fullcalendar', 'minified')) {
$description = array();
$fullcalendar_library = libraries_detect('fullcalendar');
if (!$fullcalendar_library['installed']) {
$description[] = $t('Could not load the FullCalendar Library');
}
$requirements['fullcalendar'] = array(
'title' => $t('FullCalendar'),
'description' => implode('<br />', $description),
'value' => 'FullCalendar Missing',
'severity' => REQUIREMENT_ERROR,
);
}
else {
$requirements['fullcalendar'] = array(
'title' => $t('FullCalendar'),
'description' => $t('The FullCalendar Library is installed'),
'value' => 'FullCalendar Installed',
'severity' => REQUIREMENT_OK,
);
}
}
return $requirements;
}