function service_container_requirements in Service Container 7.2
Implements hook_requirements().
File
- ./
service_container.install, line 14 - Creates the following tables:
Code
function service_container_requirements($phase) {
// Attempt to load the "any" dependencies module.
if (!module_exists('any')) {
module_enable([
'any',
]);
}
// If "any" still doesn't exist then inform the user.
if (!module_exists('any')) {
$t = get_t();
$requirements["service_container-missing-any"] = [
'title' => $t('Missing "any" dependency'),
'description' => $t('The module "service_container" requires the !url project. Please download and install it first.', [
'!url' => 'https://www.drupal.org/project/any',
]),
'severity' => REQUIREMENT_ERROR,
];
return $requirements;
}
// Load the "any" module and let it perform requirement checks.
drupal_load('module', 'any');
return any_check_install_requirements($phase, 'service_container');
}