function linkit_requirements in Linkit 6
Implementation of hook_requirements().
File
- ./
linkit.install, line 18 - Installation file for linkit.
Code
function linkit_requirements($phase) {
$requirements = array();
$t = get_t();
switch ($phase) {
case 'runtime':
if (!module_exists('pathfilter') && !module_exists('pathologic')) {
$severity = REQUIREMENT_ERROR;
$value = t('Please install pathfilter <strong>OR</strong> pathologic');
}
else {
$severity = REQUIREMENT_OK;
$value = t('Ok');
}
$requirements['linkit_dependencies'] = array(
'title' => t('Linkit'),
'severity' => $severity,
'value' => $value,
'description' => t('To parse "internal:" links <a href="@pathfilter">pathfilter</a> <strong>OR</strong> <a href="@pathologic">pathologic</a> must be installed.', array(
'@pathfilter' => 'http://drupal.org/project/pathfilter',
'@pathologic' => 'http://drupal.org/project/pathologic',
)),
);
break;
}
return $requirements;
}