public EntityTypeEventSubscriberTrait::onEntityTypeEvent(EntityTypeEvent $event, $event_name)
Listener method for any entity type definition event.
\Drupal\Core\Entity\EntityTypeEvent $event: The field storage definition event object.
string $event_name: The event name.
public function onEntityTypeEvent(EntityTypeEvent $event, $event_name) { switch ($event_name) { case EntityTypeEvents::CREATE: $this->onEntityTypeCreate($event->getEntityType()); break; case EntityTypeEvents::UPDATE: $this->onEntityTypeUpdate($event->getEntityType(), $event->getOriginal()); break; case EntityTypeEvents::DELETE: $this->onEntityTypeDelete($event->getEntityType()); break; } }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Entity!EntityTypeEventSubscriberTrait.php/function/EntityTypeEventSubscriberTrait::onEntityTypeEvent/8.1.x