function _configuration_export_maximize_dependencies in Configuration Management 7
Iterates over a list of dependencies and maximize the list of modules.
File
- ./
configuration.export.inc, line 107
Code
function _configuration_export_maximize_dependencies($dependencies, $module_name = '', $maximized = array(), $first = TRUE) {
foreach ($dependencies as $k => $v) {
$parsed_dependency = drupal_parse_dependency($v);
$name = $parsed_dependency['name'];
if (!in_array($name, $maximized)) {
$maximized[] = $name;
$module = configuration_get_modules($name);
if ($module && !empty($module->info['dependencies'])) {
$maximized = array_merge($maximized, _configuration_export_maximize_dependencies($module->info['dependencies'], $module_name, $maximized, FALSE));
}
}
}
return array_unique($maximized);
}