You are here

class EntityBaseFieldInfoEvent in Hook Event Dispatcher 8

Class EntityBaseFieldInfoEvent.

Hierarchy

Expanded class hierarchy of EntityBaseFieldInfoEvent

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

File

src/Event/EntityType/EntityBaseFieldInfoEvent.php, line 13

Namespace

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

  /**
   * The entity type.
   *
   * @var \Drupal\Core\Entity\EntityTypeInterface
   */
  private $entityType;

  /**
   * The fields.
   *
   * @var static[]
   */
  private $fields = [];

  /**
   * EntityBaseFieldInfoEvent constructor.
   *
   * @param \Drupal\Core\Entity\EntityTypeInterface $entityType
   *   The entity type.
   */
  public function __construct(EntityTypeInterface $entityType) {
    $this->entityType = $entityType;
  }

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

  /**
   * Get the entity type.
   *
   * @return \Drupal\Core\Entity\EntityTypeInterface
   *   The entity type.
   */
  public function getEntityType() {
    return $this->entityType;
  }

  /**
   * Get the fields.
   *
   * @return static[]
   *   The fields.
   */
  public function getFields() {
    return $this->fields;
  }

  /**
   * Set the fields.
   *
   * @param static[] $fields
   *   The fields.
   */
  public function setFields(array $fields) {
    $this->fields = $fields;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
EntityBaseFieldInfoEvent::$entityType private property The entity type.
EntityBaseFieldInfoEvent::$fields private property The fields.
EntityBaseFieldInfoEvent::getDispatcherType public function Get the dispatcher type. Overrides EventInterface::getDispatcherType
EntityBaseFieldInfoEvent::getEntityType public function Get the entity type.
EntityBaseFieldInfoEvent::getFields public function Get the fields.
EntityBaseFieldInfoEvent::setFields public function Set the fields.
EntityBaseFieldInfoEvent::__construct public function EntityBaseFieldInfoEvent constructor.