function bat_event_requirements in Booking and Availability Management Tools for Drupal 7
Same name and namespace in other branches
- 8 modules/bat_event/bat_event.install \bat_event_requirements()
Implements hook_requirements().
File
- modules/
bat_event/ bat_event.install, line 288 - Sets up the base table for our entity and a table to store information about the entity types.
Code
function bat_event_requirements($phase) {
$requirements = array();
$t = get_t();
switch ($phase) {
case 'runtime':
module_load_include('inc', 'composer_manager', 'composer_manager.admin');
$composer_manager_installed_packages = composer_manager_installed_packages();
if (!isset($composer_manager_installed_packages['roomify/bat'])) {
$requirements['bat_library'] = array(
'title' => $t('BAT PHP Library'),
'value' => $t('BAT PHP Library missing'),
'severity' => REQUIREMENT_ERROR,
);
}
else {
$requirements['bat_library'] = array(
'title' => $t('BAT PHP Library'),
'value' => $t('BAT PHP Library installed'),
'severity' => REQUIREMENT_OK,
);
}
}
return $requirements;
}