function eck_requirements in Entity Construction Kit (ECK) 7.3
Same name and namespace in other branches
- 7.2 eck.install \eck_requirements()
Implements hook_requirements().
File
- ./
eck.install, line 10 - ECK's requirements, schemas, and logic for install and uninstall.
Code
function eck_requirements($phase) {
$requirements = array();
if ($phase == 'update') {
// I guess we just need to check whether the module exists, and then the
// update can enable it if it is not enabled.
$requirements['ctools'] = array(
'title' => 'CTools Module Required',
'description' => "ECK uses the plugin implementation offered by the CTools module",
);
if (module_exists('ctools')) {
$requirements['ctools']['severity'] = REQUIREMENT_OK;
}
else {
$requirements['ctools']['severity'] = REQUIREMENT_ERROR;
}
}
return $requirements;
}