class EntityTypeEvents
Same name in other branches
- 9 core/lib/Drupal/Core/Entity/EntityTypeEvents.php \Drupal\Core\Entity\EntityTypeEvents
- 8.9.x core/lib/Drupal/Core/Entity/EntityTypeEvents.php \Drupal\Core\Entity\EntityTypeEvents
- 11.x core/lib/Drupal/Core/Entity/EntityTypeEvents.php \Drupal\Core\Entity\EntityTypeEvents
Contains all events thrown while handling entity types.
Hierarchy
- class \Drupal\Core\Entity\EntityTypeEvents
Expanded class hierarchy of EntityTypeEvents
3 files declare their use of EntityTypeEvents
- EntityDefinitionUpdateTest.php in core/
tests/ Drupal/ KernelTests/ Core/ Entity/ EntityDefinitionUpdateTest.php - EntityTestDefinitionSubscriber.php in core/
modules/ system/ tests/ modules/ entity_test/ src/ EntityTestDefinitionSubscriber.php - ViewsEntitySchemaSubscriberIntegrationTest.php in core/
modules/ views/ tests/ src/ Kernel/ EventSubscriber/ ViewsEntitySchemaSubscriberIntegrationTest.php
File
-
core/
lib/ Drupal/ Core/ Entity/ EntityTypeEvents.php, line 8
Namespace
Drupal\Core\EntityView source
final class EntityTypeEvents {
/**
* 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\EntityTypeListenerInterface::onEntityTypeCreate()
* @see \Drupal\Core\Entity\EntityTypeEventSubscriberTrait
* @see \Drupal\views\EventSubscriber\ViewsEntitySchemaSubscriber::onEntityTypeCreate()
*
* @var string
*/
const CREATE = 'entity_type.definition.create';
/**
* 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\EntityTypeListenerInterface::onEntityTypeUpdate()
* @see \Drupal\Core\Entity\EntityTypeEventSubscriberTrait
* @see \Drupal\views\EventSubscriber\ViewsEntitySchemaSubscriber::onEntityTypeUpdate()
*
* @var string
*/
const UPDATE = 'entity_type.definition.update';
/**
* 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\EntityTypeListenerInterface::onEntityTypeDelete()
* @see \Drupal\Core\Entity\EntityTypeEventSubscriberTrait
* @see \Drupal\views\EventSubscriber\ViewsEntitySchemaSubscriber::onEntityTypeDelete()
*
* @var string
*/
const DELETE = 'entity_type.definition.delete';
}
Members
Title Sort descending | Modifiers | Object type | Summary |
---|---|---|---|
EntityTypeEvents::CREATE | constant | The name of the event triggered when a new entity type is created. | |
EntityTypeEvents::DELETE | constant | The name of the event triggered when an existing entity type is deleted. | |
EntityTypeEvents::UPDATE | constant | The name of the event triggered when an existing entity type is updated. |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.