public function Activity::preSaveRevision in CRM Core 8
Same name and namespace in other branches
- 8.2 modules/crm_core_activity/src/Entity/Activity.php \Drupal\crm_core_activity\Entity\Activity::preSaveRevision()
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_activity/ src/ Entity/ Activity.php, line 185
Class
- Activity
- CRM Activity Entity Class.
Namespace
Drupal\crm_core_activity\EntityCode
public function preSaveRevision(EntityStorageInterface $storage, \stdClass $record) {
parent::preSaveRevision($storage, $record);
$account = \Drupal::currentUser();
$record->uid = $account
->id();
}