You are here

class EntityTypeBuildEvent in Hook Event Dispatcher 3.x

Same name and namespace in other branches
  1. 8.2 modules/core_event_dispatcher/src/Event/Entity/EntityTypeBuildEvent.php \Drupal\core_event_dispatcher\Event\Entity\EntityTypeBuildEvent

Class EntityTypeBuildEvent.

Hierarchy

Expanded class hierarchy of EntityTypeBuildEvent

2 files declare their use of EntityTypeBuildEvent
core_event_dispatcher.module in modules/core_event_dispatcher/core_event_dispatcher.module
Core event dispatcher submodule.
EntityTypeBuildEventTest.php in modules/core_event_dispatcher/tests/src/Unit/Entity/EntityTypeBuildEventTest.php

File

modules/core_event_dispatcher/src/Event/Entity/EntityTypeBuildEvent.php, line 12

Namespace

Drupal\core_event_dispatcher\Event\Entity
View source
class EntityTypeBuildEvent extends Event implements EventInterface {

  /**
   * Field info.
   *
   * @var array
   */
  private $entityTypes;

  /**
   * EntityTypeBuildEvent constructor.
   *
   * @param array $entityTypes
   *   Extra field info.
   */
  public function __construct(array &$entityTypes) {
    $this->entityTypes =& $entityTypes;
  }

  /**
   * {@inheritdoc}
   */
  public function getDispatcherType() : string {
    return HookEventDispatcherInterface::ENTITY_TYPE_BUILD;
  }

  /**
   * Get the entity types.
   *
   * @return \Drupal\Core\Entity\EntityTypeInterface[]
   *   Entity types info.
   */
  public function &getEntityTypes() : array {
    return $this->entityTypes;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
EntityTypeBuildEvent::$entityTypes private property Field info.
EntityTypeBuildEvent::getDispatcherType public function Get the dispatcher type. Overrides EventInterface::getDispatcherType
EntityTypeBuildEvent::getEntityTypes public function Get the entity types.
EntityTypeBuildEvent::__construct public function EntityTypeBuildEvent constructor.