You are here

class FieldFormatterInfoAlterEvent in Hook Event Dispatcher 3.x

Same name and namespace in other branches
  1. 8.2 modules/field_event_dispatcher/src/Event/Field/FieldFormatterInfoAlterEvent.php \Drupal\field_event_dispatcher\Event\Field\FieldFormatterInfoAlterEvent

Class FieldFormatterInfoAlterEvent.

Hierarchy

Expanded class hierarchy of FieldFormatterInfoAlterEvent

2 files declare their use of FieldFormatterInfoAlterEvent
FieldFormatterInfoAlterEventTest.php in modules/field_event_dispatcher/tests/src/Unit/Field/FieldFormatterInfoAlterEventTest.php
field_event_dispatcher.module in modules/field_event_dispatcher/field_event_dispatcher.module
Field event dispatcher submodule.

File

modules/field_event_dispatcher/src/Event/Field/FieldFormatterInfoAlterEvent.php, line 12

Namespace

Drupal\field_event_dispatcher\Event\Field
View source
class FieldFormatterInfoAlterEvent extends Event implements EventInterface {

  /**
   * An array of information on existing field formatter types.
   *
   * @var array
   */
  private $info;

  /**
   * FieldFormatterInfoAlterEvent constructor.
   *
   * @param array &$info
   *   An array of information on existing field formatter types.
   */
  public function __construct(array &$info) {
    $this->info =& $info;
  }

  /**
   * Get the existing field formatter type definitions.
   *
   * @return array
   *   An array of information on existing field formatter types.
   */
  public function &getInfo() : array {
    return $this->info;
  }

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

}

Members

Namesort descending Modifiers Type Description Overrides
FieldFormatterInfoAlterEvent::$info private property An array of information on existing field formatter types.
FieldFormatterInfoAlterEvent::getDispatcherType public function Get the dispatcher type. Overrides EventInterface::getDispatcherType
FieldFormatterInfoAlterEvent::getInfo public function Get the existing field formatter type definitions.
FieldFormatterInfoAlterEvent::__construct public function FieldFormatterInfoAlterEvent constructor.