function google_calendar_block_requirements in Google Calendar Block 7
Same name and namespace in other branches
- 7.2 google_calendar_block.install \google_calendar_block_requirements()
Implements hook_requirements().
File
- ./
google_calendar_block.install, line 11 - Install, update and uninstall functions for the google_calendar_block module.
Code
function google_calendar_block_requirements($phase) {
$requirements = array();
$t = get_t();
if ($phase == 'runtime') {
// Check if the ZF1 PHP library is installed.
if (($library = libraries_detect('zf1')) && !empty($library['installed'])) {
$requirements['google_calendar_block_library'] = array(
'title' => $t('ZF1 PHP library'),
'value' => $t('Installed'),
'severity' => REQUIREMENT_OK,
);
}
else {
$requirements['google_calendar_block_library'] = array(
'title' => $t('ZF1 PHP library'),
'value' => $t('Not installed'),
'description' => $library['error message'],
'severity' => REQUIREMENT_ERROR,
);
}
}
return $requirements;
}