You are here

function registration_entity_update in Entity Registration 8

Same name and namespace in other branches
  1. 8.2 registration.module \registration_entity_update()
  2. 7.2 registration.module \registration_entity_update()
  3. 7 registration.module \registration_entity_update()

Implements hook_entity_update().

File

./registration.module, line 824

Code

function registration_entity_update($entity, $entity_type) {
  $registration_type = registration_get_entity_registration_type($entity_type, $entity);
  if ($registration_type !== FALSE) {
    list($entity_id) = entity_extract_ids($entity_type, $entity);
    $settings = registration_entity_settings($entity_type, $entity_id);

    // no settings yet, try to set defaults
    if (!$settings) {
      registration_entity_set_default_settings($entity_type, $entity);
    }
  }
}