You are here

public function CommerceLicenseEntityController::save in Commerce License 7

Overrides EntityBundlePluginEntityController::save().

Overrides EntityAPIController::save

File

includes/commerce_license.controller.inc, line 13
Controller for the commerce_license entity type.

Class

CommerceLicenseEntityController
@file Controller for the commerce_license entity type.

Code

public function save($entity, DatabaseTransaction $transaction = NULL) {
  $entity->is_new_revision = !empty($entity->is_new_revision) || !empty($entity->revision) || !empty($entity->is_new);

  // New revisions are always set as default.
  if ($entity->is_new_revision) {
    $entity->default_revision = TRUE;
  }
  parent::save($entity, $transaction);

  // Guard against #2291623.
  unset($entity->revision);
}