You are here

function bean_uuid_bean_presave in Bean (for Drupal 7) 7

Implements bean_presave().

File

bean_uuid/bean_uuid.module, line 21
Implement UUID/Entity hooks for integrating with deploy and other modules.

Code

function bean_uuid_bean_presave($bean) {
  if (!empty($bean->is_new_revision)) {
    $bean->vuuid = uuid_generate();
  }
}