You are here

class WebformElementInfoAlterEvent in Hook Event Dispatcher 3.x

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. 8 modules/webform_event_dispatcher/src/Event/WebformElement/WebformElementInfoAlterEvent.php \Drupal\webform_event_dispatcher\Event\WebformElement\WebformElementInfoAlterEvent

Class WebformElementInfoAlterEvent.

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 12

Namespace

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

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

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

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

  /**
   * {@inheritdoc}
   */
  public function getDispatcherType() : string {
    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.