You are here

function uuid_term_features_export in UUID Features Integration 7

Same name and namespace in other branches
  1. 6 includes/uuid_term.features.inc \uuid_term_features_export()

Implements hook_features_export().

File

includes/uuid_term.features.inc, line 45
Features hooks for the uuid_term features component.

Code

function uuid_term_features_export($data, &$export, $module_name = '') {
  $pipe = array();
  $export['dependencies']['taxonomy'] = 'taxonomy';
  $export['dependencies']['uuid'] = 'uuid';
  $export['dependencies']['uuid_features'] = 'uuid_features';
  $entity_type = 'taxonomy_term';

  // Load all the terms at once by their uuid.
  $terms = entity_uuid_load($entity_type, $data, array(), TRUE);
  foreach ($terms as $term) {
    uuid_term_features_get_dependencies($export, $term->uuid, $module_name);
    $alter_data =& $export;
    $alter_data['__drupal_alter_by_ref']['pipe'] =& $pipe;
    drupal_alter('uuid_entity_features_export', $entity_type, $export, $term, $module_name);
    drupal_alter('uuid_term_features_export', $alter_data, $term, $module_name);
    unset($alter_data['__drupal_alter_by_ref']);
  }
  return $pipe;
}