function taxonomy_entity_uuid_load in Universally Unique IDentifier 7
Implements hook_entity_uuid_load().
Related topics
File
- ./
uuid.core.inc, line 231 - Implementation of UUID hooks for all core modules.
Code
function taxonomy_entity_uuid_load(&$entities, $entity_type) {
if ($entity_type == 'taxonomy_term') {
foreach ($entities as &$entity) {
if (isset($entity->parent)) {
if (!is_array($entity->parent)) {
$entity->parent = array(
$entity->parent,
);
}
$uuids = entity_get_uuid_by_id('taxonomy_term', $entity->parent);
$entity->parent = array_values($uuids);
}
unset($entity->vid);
}
}
}