EntityTypeEventSubscriberTrait::getEntityTypeEvents

public static EntityTypeEventSubscriberTrait::getEntityTypeEvents()

Gets the subscribed events.

Return value

array An array of subscribed event names.

See also

\Symfony\Component\EventDispatcher\EventSubscriberInterface::getSubscribedEvents()

File

core/lib/Drupal/Core/Entity/EntityTypeEventSubscriberTrait.php, line 24

Class

EntityTypeEventSubscriberTrait
Helper methods for EntityTypeListenerInterface.

Namespace

Drupal\Core\Entity

Code

public static function getEntityTypeEvents() {
  $event = array('onEntityTypeEvent', 100);
  $events[EntityTypeEvents::CREATE][] = $event;
  $events[EntityTypeEvents::UPDATE][] = $event;
  $events[EntityTypeEvents::DELETE][] = $event;
  return $events;
}
doc_Drupal
2016-10-29 09:08:14
Comments
Leave a Comment

Please login to continue.