You are here

public function ScheduledTransitionsEntityHooks::entityRevisionDelete in Scheduled Transitions 8

Same name and namespace in other branches
  1. 2.x src/ScheduledTransitionsEntityHooks.php \Drupal\scheduled_transitions\ScheduledTransitionsEntityHooks::entityRevisionDelete()

Implements hook_entity_revision_delete().

See also

\scheduled_transitions_entity_revision_delete()

File

src/ScheduledTransitionsEntityHooks.php, line 131

Class

ScheduledTransitionsEntityHooks
Entity related hooks for Scheduled Transitions module.

Namespace

Drupal\scheduled_transitions

Code

public function entityRevisionDelete(EntityInterface $entity) : void {
  $transitionStorage = $this->entityTypeManager
    ->getStorage('scheduled_transition');
  $transitionsForEntity = $this
    ->loadByHostEntity($entity, TRUE);
  $transitionStorage
    ->delete($transitionsForEntity);
}