function EntityTypeEvent::__construct

Same name and namespace in other branches
  1. 9 core/lib/Drupal/Core/Entity/EntityTypeEvent.php \Drupal\Core\Entity\EntityTypeEvent::__construct()
  2. 8.9.x core/lib/Drupal/Core/Entity/EntityTypeEvent.php \Drupal\Core\Entity\EntityTypeEvent::__construct()
  3. 10 core/lib/Drupal/Core/Entity/EntityTypeEvent.php \Drupal\Core\Entity\EntityTypeEvent::__construct()

Constructs a new EntityTypeEvent.

Parameters

\Drupal\Core\Entity\EntityTypeInterface $entity_type: The field storage definition.

\Drupal\Core\Entity\EntityTypeInterface $original: (optional) The original entity type. This should be passed only when updating the entity type.

File

core/lib/Drupal/Core/Entity/EntityTypeEvent.php, line 35

Class

EntityTypeEvent
Defines a base class for all entity type events.

Namespace

Drupal\Core\Entity

Code

public function __construct(EntityTypeInterface $entity_type, ?EntityTypeInterface $original = NULL) {
    $this->entityType = $entity_type;
    $this->original = $original;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.