EntityEventSubscriber.php in Entity Events 8
File
src/EventSubscriber/EntityEventSubscriber.php
View source
<?php
namespace Drupal\entity_events\EventSubscriber;
use Drupal\entity_events\EntityEventType;
use Drupal\entity_events\Event\EntityEvent;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
abstract class EntityEventSubscriber implements EventSubscriberInterface {
public static function getSubscribedEvents() {
$events[EntityEventType::INSERT][] = [
'onEntityInsert',
800,
];
$events[EntityEventType::UPDATE][] = [
'onEntityUpdate',
800,
];
$events[EntityEventType::DELETE][] = [
'onEntityDelete',
800,
];
return $events;
}
public function onEntityInsert(EntityEvent $event) {
}
public function onEntityUpdate(EntityEvent $event) {
}
public function onEntityDelete(EntityEvent $event) {
}
}