You are here

function uuid_uuid_sync in Universally Unique IDentifier 7

Implements hook_uuid_sync().

File

./uuid.module, line 156
Main module functions for the uuid module.

Code

function uuid_uuid_sync() {
  foreach (entity_get_info() as $info) {
    if (isset($info['uuid']) && $info['uuid'] == TRUE && !empty($info['entity keys']['uuid'])) {
      _uuid_sync_table($info['base table'], $info['entity keys']['id'], $info['entity keys']['uuid']);
      if (!empty($info['entity keys']['revision uuid'])) {
        _uuid_sync_table($info['revision table'], $info['entity keys']['revision'], $info['entity keys']['revision uuid']);
      }
    }
  }
}