You are here

public function Individual::preSaveRevision in CRM Core 8.2

Acts on a revision before it gets saved.

Parameters

EntityStorageInterface $storage: The entity storage object.

object $record: The revision object.

Overrides RevisionableInterface::preSaveRevision

File

modules/crm_core_contact/src/Entity/Individual.php, line 216

Class

Individual
CRM Individual Entity Class.

Namespace

Drupal\crm_core_contact\Entity

Code

public function preSaveRevision(EntityStorageInterface $storage, \stdClass $record) {
  parent::preSaveRevision($storage, $record);
  $account = \Drupal::currentUser();
  $record->uid = $account
    ->id();
}