public static function ExampleFormEventSubscribers::getSubscribedEvents in Hook Event Dispatcher 8.2
Same name and namespace in other branches
- 3.x examples/ExampleFormEventSubscribers.php \Drupal\hook_event_dispatcher\ExampleFormEventSubscribers::getSubscribedEvents()
File
- examples/
ExampleFormEventSubscribers.php, line 64
Class
- ExampleFormEventSubscribers
- Class ExampleFormEventSubscribers.
Namespace
Drupal\hook_event_dispatcherCode
public static function getSubscribedEvents() : array {
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',
];
}