You are here

function taxonomy_features_export in Features 6

Same name and namespace in other branches
  1. 7.2 includes/features.taxonomy.inc \taxonomy_features_export()
  2. 7 includes/features.taxonomy.inc \taxonomy_features_export()

Implementation of hook_features_export().

@todo Test adding existing dependencies.

File

includes/features.taxonomy.inc, line 33

Code

function taxonomy_features_export($data, &$export, $module_name = '') {

  // taxonomy_default_vocabularies integration is provided by Features.
  $export['dependencies']['features'] = 'features';
  $export['dependencies']['taxonomy'] = 'taxonomy';

  // Add dependencies for each vocabulary.
  $map = features_get_default_map('taxonomy');
  foreach ($data as $machine_name) {
    if (isset($map[$machine_name]) && $map[$machine_name] != $module_name) {
      $export['dependencies'][$map[$machine_name]] = $map[$machine_name];
    }
    else {
      $export['features']['taxonomy'][$machine_name] = $machine_name;
    }
  }
  return array();
}