EntityTypeEvents.php 1.97 KB
Newer Older
1 2 3 4 5 6 7 8 9 10
<?php

namespace Drupal\Core\Entity;

/**
 * Contains all events thrown while handling entity types.
 */
final class EntityTypeEvents {

  /**
11 12 13 14 15 16 17 18 19 20 21 22
   * The name of the event triggered when a new entity type is created.
   *
   * This event allows modules to react to a new entity type being created. The
   * event listener method receives a \Drupal\Core\Entity\EntityTypeEvent
   * instance.
   *
   * @Event
   *
   * @see \Drupal\Core\Entity\EntityTypeEvent
   * @see \Drupal\Core\Entity\EntityManager::onEntityTypeCreate()
   * @see \Drupal\Core\Entity\EntityTypeEventSubscriberTrait
   * @see \Drupal\views\EventSubscriber\ViewsEntitySchemaSubscriber::onEntityTypeCreate()
23 24 25 26 27 28
   *
   * @var string
   */
  const CREATE = 'entity_type.definition.create';

  /**
29 30 31 32 33 34 35 36 37 38 39 40
   * The name of the event triggered when an existing entity type is updated.
   *
   * This event allows modules to react whenever an existing entity type is
   * updated. The event listener method receives a
   * \Drupal\Core\Entity\EntityTypeEvent instance.
   *
   * @Event
   *
   * @see \Drupal\Core\Entity\EntityTypeEvent
   * @see \Drupal\Core\Entity\EntityManager::onEntityTypeUpdate()
   * @see \Drupal\Core\Entity\EntityTypeEventSubscriberTrait
   * @see \Drupal\views\EventSubscriber\ViewsEntitySchemaSubscriber::onEntityTypeUpdate()
41 42 43 44 45 46
   *
   * @var string
   */
  const UPDATE = 'entity_type.definition.update';

  /**
47 48 49 50 51 52 53 54 55 56 57 58
   * The name of the event triggered when an existing entity type is deleted.
   *
   * This event allows modules to react whenever an existing entity type is
   * deleted.  The event listener method receives a
   * \Drupal\Core\Entity\EntityTypeEvent instance.
   *
   * @Event
   *
   * @see \Drupal\Core\Entity\EntityTypeEvent
   * @see \Drupal\Core\Entity\EntityManager::onEntityTypeDelete()
   * @see \Drupal\Core\Entity\EntityTypeEventSubscriberTrait
   * @see \Drupal\views\EventSubscriber\ViewsEntitySchemaSubscriber::onEntityTypeDelete()
59 60 61 62 63 64
   *
   * @var string
   */
  const DELETE = 'entity_type.definition.delete';

}