You are here

class EntityTypeBuildEvent in Hook Event Dispatcher 8

Class EntityTypeBuildEvent.

Hierarchy

Expanded class hierarchy of EntityTypeBuildEvent

2 files declare their use of EntityTypeBuildEvent
EntityTypeBuildEventTest.php in tests/src/Unit/EntityType/EntityTypeBuildEventTest.php
hook_event_dispatcher.module in ./hook_event_dispatcher.module
Hook event dispatcher module.

File

src/Event/EntityType/EntityTypeBuildEvent.php, line 12

Namespace

Drupal\hook_event_dispatcher\Event\EntityType
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() {
    return HookEventDispatcherInterface::ENTITY_TYPE_BUILD;
  }

  /**
   * Get the entity types.
   *
   * @return \Drupal\Core\Entity\EntityTypeInterface[]
   *   Entity types info.
   */
  public function &getEntityTypes() {
    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.