You are here

abstract class EntityEventPresaveSubscriber in Entity Events 2.0.x

Event subscriber for entity presave event.

Hierarchy

  • class \Drupal\entity_events\EventSubscriber\EntityEventPresaveSubscriber implements \Symfony\Component\EventDispatcher\EventSubscriberInterface

Expanded class hierarchy of EntityEventPresaveSubscriber

File

src/EventSubscriber/EntityEventPresaveSubscriber.php, line 12

Namespace

Drupal\entity_events\EventSubscriber
View source
abstract class EntityEventPresaveSubscriber implements EventSubscriberInterface {

  /**
   * {@inheritdoc}
   */
  public static function getSubscribedEvents() {
    $events[EntityEventType::PRESAVE][] = [
      'onEntityPresave',
      800,
    ];
    return $events;
  }

  /**
   * Method called when Event occurs.
   *
   * @param \Drupal\entity_events\Event\EntityEvent $event
   *   The event.
   */
  public abstract function onEntityPresave(EntityEvent $event);

}

Members

Namesort descending Modifiers Type Description Overrides
EntityEventPresaveSubscriber::getSubscribedEvents public static function
EntityEventPresaveSubscriber::onEntityPresave abstract public function Method called when Event occurs.