You are here

class EntityBaseFieldInfoAlterEvent in Hook Event Dispatcher 8

Class EntityBaseFieldInfoAlterEvent.

Hierarchy

Expanded class hierarchy of EntityBaseFieldInfoAlterEvent

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

File

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

Namespace

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

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

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

  /**
   * EntityExtraFieldInfoAlterEvent constructor.
   *
   * @param array $fields
   *   Extra field info.
   * @param \Drupal\Core\Entity\EntityTypeInterface $entityType
   *   The entity type.
   */
  public function __construct(array &$fields, EntityTypeInterface $entityType) {
    $this->entityType = $entityType;
    $this->fields =& $fields;
  }

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

  /**
   * Get the field info.
   *
   * @return array
   *   Extra field info.
   */
  public function &getFields() {
    return $this->fields;
  }

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

}

Members

Namesort descending Modifiers Type Description Overrides
EntityBaseFieldInfoAlterEvent::$entityType private property The entity type.
EntityBaseFieldInfoAlterEvent::$fields private property Field info.
EntityBaseFieldInfoAlterEvent::getDispatcherType public function Get the dispatcher type. Overrides EventInterface::getDispatcherType
EntityBaseFieldInfoAlterEvent::getEntityType public function Get the entity type.
EntityBaseFieldInfoAlterEvent::getFields public function Get the field info.
EntityBaseFieldInfoAlterEvent::__construct public function EntityExtraFieldInfoAlterEvent constructor.