You are here

class EntityTypeAlterEvent in Hook Event Dispatcher 8

Class EntityTypeBuildEvent.

Hierarchy

Expanded class hierarchy of EntityTypeAlterEvent

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

File

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

Namespace

Drupal\hook_event_dispatcher\Event\EntityType
View source
class EntityTypeAlterEvent extends Event implements EventInterface {

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

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

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

  /**
   * 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
EntityTypeAlterEvent::$entityTypes private property Field info.
EntityTypeAlterEvent::getDispatcherType public function Get the dispatcher type. Overrides EventInterface::getDispatcherType
EntityTypeAlterEvent::getEntityTypes public function Get the entity types.
EntityTypeAlterEvent::__construct public function EntityTypeBuildEvent constructor.