You are here

function content_moderation_notifications_entity_presave in Content Moderation Notifications 8.2

Same name and namespace in other branches
  1. 8.3 content_moderation_notifications.module \content_moderation_notifications_entity_presave()

Implements hook_entity_presave().

File

./content_moderation_notifications.module, line 14
Hook implementations for the content moderation notifications module.

Code

function content_moderation_notifications_entity_presave(EntityInterface $entity) {

  // Attach the last revision of the entity.
  // It's important to attach the revision in hook_entity_presave() as the same
  // action in hook_entity_update() will result a different revision being
  // in transaction.
  _content_moderation_notifications_ensure_revision($entity);
}