You are here

function taxonomy_uuid_node_features_export_alter in UUID Features Integration 7

Same name and namespace in other branches
  1. 6 includes/modules/taxonomy.inc \taxonomy_uuid_node_features_export_alter()

Implements hook_uuid_node_features_export_render_alter().

File

includes/modules/taxonomy.inc, line 10
uuid_node hooks on behalf of the taxonomy module.

Code

function taxonomy_uuid_node_features_export_alter(&$export, $node) {

  // Access / modify the pipe.
  $pipe =& $export['__drupal_alter_by_ref']['pipe'];
  if (!empty($node->taxonomy)) {
    foreach ($node->taxonomy as $term) {
      $vocabulary = taxonomy_vocabulary_load($term->vid);
      $voc_uuid = $vocabulary->machine_name;
      $pipe['uuid_vocabulary'][$voc_uuid] = $voc_uuid;
      $term_uuid = $term->uuid;
      $pipe['uuid_term'][$term_uuid] = $term_uuid;
    }
  }
}