public function ScheduledTransitionsEntityHooks::entityRevisionDelete in Scheduled Transitions 8
Same name and namespace in other branches
- 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_transitionsCode
public function entityRevisionDelete(EntityInterface $entity) : void {
$transitionStorage = $this->entityTypeManager
->getStorage('scheduled_transition');
$transitionsForEntity = $this
->loadByHostEntity($entity, TRUE);
$transitionStorage
->delete($transitionsForEntity);
}