You are here

function _features_resolve_dependencies in Features 7

Same name and namespace in other branches
  1. 6 features.export.inc \_features_resolve_dependencies()
  2. 7.2 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 88

Code

function _features_resolve_dependencies(&$data, &$export, $module_name, $component) {
  if ($map = features_get_default_map($component)) {
    foreach ($data as $key => $item) {

      // If this node type is provided by a different module, add it as a dependency
      if (isset($map[$item]) && $map[$item] != $module_name) {
        $export['dependencies'][$map[$item]] = $map[$item];
        unset($data[$key]);
      }
    }
  }
}