You are here

function entity_make_entity_universal in Universally Unique IDentifier 7

Helper function to make an entity universal (i.e. only global references).

Related topics

1 call to entity_make_entity_universal()
entity_uuid_load in ./uuid.entity.inc
Load entities by their UUID, that only should containing UUID references.

File

./uuid.entity.inc, line 210
Entity related functions for UUID module.

Code

function entity_make_entity_universal($entity_type, $entities) {

  // Let other modules transform local ID references to UUID references.
  if (!empty($entities)) {
    $hook = 'entity_uuid_load';
    foreach (module_implements($hook) as $module) {
      $function = $module . '_' . $hook;
      if (function_exists($function)) {
        $function($entities, $entity_type);
      }
    }
  }
}