You are here

public static function ExampleFormEventSubscribers::getSubscribedEvents in Hook Event Dispatcher 8

File

src/Example/ExampleFormEventSubscribers.php, line 96

Class

ExampleFormEventSubscribers
Class ExampleFormEventSubscribers.

Namespace

Drupal\hook_event_dispatcher\Example

Code

public static function getSubscribedEvents() {
  return [
    HookEventDispatcherInterface::FORM_ALTER => 'alterForm',
    // React on "search_block_form" form.
    'hook_event_dispatcher.form_search_block_form.alter' => 'alterSearchForm',
    // React on al forms with base id "node_form".
    'hook_event_dispatcher.form_base_node_form.alter' => 'alterNodeForm',
    'hook_event_dispatcher.widget_string_textfield.alter' => 'alterWidgetStringTextField',
  ];
}