function dependencies_features_rebuild in Features 7
Same name and namespace in other branches
- 6 includes/features.features.inc \dependencies_features_rebuild()
- 7.2 includes/features.features.inc \dependencies_features_rebuild()
Implements hook_features_rebuild(). Ensure that all of a feature's dependencies are enabled.
1 call to dependencies_features_rebuild()
- dependencies_features_revert in includes/
features.features.inc - Implements hook_features_revert().
File
- includes/
features.features.inc, line 57
Code
function dependencies_features_rebuild($module) {
$feature = features_get_features($module);
if (!empty($feature->info['dependencies'])) {
$install = array();
foreach ($feature->info['dependencies'] as $dependency) {
// Parse the dependency string into the module name and version information.
$parsed_dependency = drupal_parse_dependency($dependency);
$dependency = $parsed_dependency['name'];
if (!module_exists($dependency)) {
$install[] = $dependency;
}
}
if (!empty($install)) {
features_install_modules($install);
}
}
}