EntityEventInsertSubscriber.php in Entity Events 2.0.x
Same filename and directory in other branches
Namespace
Drupal\entity_events\EventSubscriberFile
src/EventSubscriber/EntityEventInsertSubscriber.phpView source
<?php
namespace Drupal\entity_events\EventSubscriber;
use Drupal\entity_events\EntityEventType;
use Drupal\entity_events\Event\EntityEvent;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
/**
* Event subscriber for entity insert event.
*/
abstract class EntityEventInsertSubscriber implements EventSubscriberInterface {
/**
* {@inheritdoc}
*/
public static function getSubscribedEvents() {
$events[EntityEventType::INSERT][] = [
'onEntityInsert',
800,
];
return $events;
}
/**
* Method called when Event occurs.
*
* @param \Drupal\entity_events\Event\EntityEvent $event
* The event.
*/
public abstract function onEntityInsert(EntityEvent $event);
}
Classes
Name | Description |
---|---|
EntityEventInsertSubscriber | Event subscriber for entity insert event. |