3 namespace Drupal\Core\Entity;
6 * Contains all events thrown while handling entity types.
8 final class EntityTypeEvents {
11 * The name of the event triggered when a new entity type is created.
13 * This event allows modules to react to a new entity type being created. The
14 * event listener method receives a \Drupal\Core\Entity\EntityTypeEvent
19 * @see \Drupal\Core\Entity\EntityTypeEvent
20 * @see \Drupal\Core\Entity\EntityManager::onEntityTypeCreate()
21 * @see \Drupal\Core\Entity\EntityTypeEventSubscriberTrait
22 * @see \Drupal\views\EventSubscriber\ViewsEntitySchemaSubscriber::onEntityTypeCreate()
26 const CREATE = 'entity_type.definition.create';
29 * The name of the event triggered when an existing entity type is updated.
31 * This event allows modules to react whenever an existing entity type is
32 * updated. The event listener method receives a
33 * \Drupal\Core\Entity\EntityTypeEvent instance.
37 * @see \Drupal\Core\Entity\EntityTypeEvent
38 * @see \Drupal\Core\Entity\EntityManager::onEntityTypeUpdate()
39 * @see \Drupal\Core\Entity\EntityTypeEventSubscriberTrait
40 * @see \Drupal\views\EventSubscriber\ViewsEntitySchemaSubscriber::onEntityTypeUpdate()
44 const UPDATE = 'entity_type.definition.update';
47 * The name of the event triggered when an existing entity type is deleted.
49 * This event allows modules to react whenever an existing entity type is
50 * deleted. The event listener method receives a
51 * \Drupal\Core\Entity\EntityTypeEvent instance.
55 * @see \Drupal\Core\Entity\EntityTypeEvent
56 * @see \Drupal\Core\Entity\EntityManager::onEntityTypeDelete()
57 * @see \Drupal\Core\Entity\EntityTypeEventSubscriberTrait
58 * @see \Drupal\views\EventSubscriber\ViewsEntitySchemaSubscriber::onEntityTypeDelete()
62 const DELETE = 'entity_type.definition.delete';