EntityTypeListenerInterface.php 1.0 KB

123456789101112131415161718192021222324252627282930313233343536
  1. <?php
  2. namespace Drupal\Core\Entity;
  3. /**
  4. * Defines an interface for reacting to entity type creation, deletion, and updates.
  5. */
  6. interface EntityTypeListenerInterface {
  7. /**
  8. * Reacts to the creation of the entity type.
  9. *
  10. * @param \Drupal\Core\Entity\EntityTypeInterface $entity_type
  11. * The entity type being created.
  12. */
  13. public function onEntityTypeCreate(EntityTypeInterface $entity_type);
  14. /**
  15. * Reacts to the update of the entity type.
  16. *
  17. * @param \Drupal\Core\Entity\EntityTypeInterface $entity_type
  18. * The updated entity type definition.
  19. * @param \Drupal\Core\Entity\EntityTypeInterface $original
  20. * The original entity type definition.
  21. */
  22. public function onEntityTypeUpdate(EntityTypeInterface $entity_type, EntityTypeInterface $original);
  23. /**
  24. * Reacts to the deletion of the entity type.
  25. *
  26. * @param \Drupal\Core\Entity\EntityTypeInterface $entity_type
  27. * The entity type being deleted.
  28. */
  29. public function onEntityTypeDelete(EntityTypeInterface $entity_type);
  30. }