function _features_export_maximize_dependencies in Features 6
Same name and namespace in other branches
- 7.2 features.export.inc \_features_export_maximize_dependencies()
- 7 features.export.inc \_features_export_maximize_dependencies()
Iterates over a list of dependencies and maximize the list of modules.
3 calls to _features_export_maximize_dependencies()
- features_admin_form in ./
features.admin.inc - admin/build/features page callback.
- features_get_orphans in ./
features.module - Generate an array of feature dependencies that have been orphaned.
- features_install_modules in ./
features.module - Enables and installs an array of modules, ignoring those already enabled & installed. Consider this a helper or extension to drupal_install_modules().
File
- ./
features.export.inc, line 125
Code
function _features_export_maximize_dependencies($dependencies, $module_name = '', $maximized = array(), $first = TRUE) {
foreach ($dependencies as $k => $v) {
if (!in_array($v, $maximized)) {
$maximized[] = $v;
$module = features_get_modules($v);
if ($module && !empty($module->info['dependencies'])) {
$maximized = array_merge($maximized, _features_export_maximize_dependencies($module->info['dependencies'], $module_name, $maximized, FALSE));
}
}
}
return array_unique($maximized);
}