function _features_resolve_dependencies in Features 6
Same name and namespace in other branches
- 7.2 features.export.inc \_features_resolve_dependencies()
- 7 features.export.inc \_features_resolve_dependencies()
Iterates over data and convert to dependencies if already defined elsewhere.
1 call to _features_resolve_dependencies()
- _features_populate in ./
features.export.inc - Iterate and descend into a feature definition to extract module dependencies and feature definition. Calls hook_features_export for modules that implement it.
File
- ./
features.export.inc, line 66
Code
function _features_resolve_dependencies(&$data, &$export, $module_name, $component) {
if ($map = features_get_default_map($component)) {
foreach ($data as $key => $item) {
// If the node type is provided by a different module, add the provider as
// a dependency.
if (isset($map[$item]) && $map[$item] != $module_name) {
$export['dependencies'][$map[$item]] = $map[$item];
unset($data[$key]);
}
}
}
}