You are here

class WebformElementInfoAlterEvent in Hook Event Dispatcher 8

Same name and namespace in other branches
  1. 8.2 modules/webform_event_dispatcher/src/Event/WebformElement/WebformElementInfoAlterEvent.php \Drupal\webform_event_dispatcher\Event\WebformElement\WebformElementInfoAlterEvent
  2. 3.x modules/webform_event_dispatcher/src/Event/WebformElement/WebformElementInfoAlterEvent.php \Drupal\webform_event_dispatcher\Event\WebformElement\WebformElementInfoAlterEvent

Class WebformElementInfoAlterEvent.

@package Drupal\webform_event_dispatcher\Event\Element

Hierarchy

Expanded class hierarchy of WebformElementInfoAlterEvent

2 files declare their use of WebformElementInfoAlterEvent
WebformElementEventTest.php in modules/webform_event_dispatcher/tests/src/Unit/WebformElement/WebformElementEventTest.php
webform_event_dispatcher.module in modules/webform_event_dispatcher/webform_event_dispatcher.module
Webform event dispatcher submodule.

File

modules/webform_event_dispatcher/src/Event/WebformElement/WebformElementInfoAlterEvent.php, line 14

Namespace

Drupal\webform_event_dispatcher\Event\WebformElement
View source
class WebformElementInfoAlterEvent extends Event implements EventInterface {

  /**
   * The webform element.
   *
   * @var array
   *   Array of webform handlers, keyed on the machine-readable element name.
   */
  private $definitions;

  /**
   * WidgetFormAlterEvent constructor.
   *
   * @param array $definitions
   *   Array of webform handlers, keyed on the machine-readable element name.
   */
  public function __construct(array &$definitions) {
    $this->definitions =& $definitions;
  }

  /**
   * Get the definitions.
   *
   * @return array
   *   Array of webform handlers, keyed on the machine-readable element name.
   */
  public function &getDefinitions() {
    return $this->definitions;
  }

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

}

Members

Namesort descending Modifiers Type Description Overrides
WebformElementInfoAlterEvent::$definitions private property The webform element.
WebformElementInfoAlterEvent::getDefinitions public function Get the definitions.
WebformElementInfoAlterEvent::getDispatcherType public function Get the dispatcher type. Overrides EventInterface::getDispatcherType
WebformElementInfoAlterEvent::__construct public function WidgetFormAlterEvent constructor.