You are here

function taxonomy_uuid_node_features_export_alter in UUID Features Integration 6

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

Implementation of hook_uuid_node_features_export_render().

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, &$pipe, $node) {
  if (!empty($node->taxonomy)) {
    foreach ($node->taxonomy as $term) {
      $voc_uuid = uuid_get_uuid('vocabulary', 'vid', $term->vid);
      if (empty($voc_uuid)) {
        $voc_uuid = uuid_set_uuid('vocabulary', 'vid', $term->vid);
      }
      $pipe['uuid_vocabulary'][$voc_uuid] = $voc_uuid;
      $term_uuid = uuid_get_uuid('term_data', 'tid', $term->tid);
      if (empty($term_uuid)) {
        $term_uuid = uuid_set_uuid('term_data', 'tid', $term->tid);
      }
      $pipe['uuid_term'][$term_uuid] = $term_uuid;
    }
  }
}