function mongodb_requirements in MongoDB 6
Same name and namespace in other branches
- 8.2 modules/mongodb/mongodb.install \mongodb_requirements()
- 8 mongodb.install \mongodb_requirements()
- 7 mongodb.install \mongodb_requirements()
Implements hook_requirements().
File
- ./
mongodb.install, line 11 - Install file for MongoDB module.
Code
function mongodb_requirements($phase) {
$requirements = array();
// Ensure translations don't break at install time.
$t = get_t();
if (!extension_loaded('mongo')) {
$requirements['mongodb'] = array(
'title' => $t('MongoDB'),
'value' => $t('Not found'),
'description' => $t('MongoDB requires the PHP MongoDB extension to be installed.'),
'severity' => REQUIREMENT_ERROR,
);
}
return $requirements;
}