3 namespace Drupal\Core\Entity;
6 * Defines an interface for reacting to entity type creation, deletion, and updates.
8 interface EntityTypeListenerInterface {
11 * Reacts to the creation of the entity type.
13 * @param \Drupal\Core\Entity\EntityTypeInterface $entity_type
14 * The entity type being created.
16 public function onEntityTypeCreate(EntityTypeInterface $entity_type);
19 * Reacts to the update of the entity type.
21 * @param \Drupal\Core\Entity\EntityTypeInterface $entity_type
22 * The updated entity type definition.
23 * @param \Drupal\Core\Entity\EntityTypeInterface $original
24 * The original entity type definition.
26 public function onEntityTypeUpdate(EntityTypeInterface $entity_type, EntityTypeInterface $original);
29 * Reacts to the deletion of the entity type.
31 * @param \Drupal\Core\Entity\EntityTypeInterface $entity_type
32 * The entity type being deleted.
34 public function onEntityTypeDelete(EntityTypeInterface $entity_type);