function postmark_requirements in Postmark 7
Same name and namespace in other branches
- 8 postmark.install \postmark_requirements()
Implementation of hook_requirements().
File
- ./
postmark.install, line 37 - PostMark installation functions.
Code
function postmark_requirements($phase) {
$requirements = array();
if ($phase == 'runtime') {
if (($library = libraries_detect('postmark-php')) && !empty($library['installed'])) {
$requirements['postmark'] = array(
'title' => 'Postmark library',
'value' => $library['version'],
'severity' => REQUIREMENT_OK,
);
}
else {
$requirements['postmark'] = array(
'title' => 'Postmark',
'value' => t('Postmark PHP external library not installed. See module README file for instructions.'),
'severity' => REQUIREMENT_ERROR,
'weight' => -1,
);
}
}
return $requirements;
}