Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // ...
- public function submitForm(array &$form, FormStateInterface $form_state)
- {
- $dispatcher = \Drupal::service('event_dispatcher');
- $example_event = new ExampleEvent($form_state->getValue('email'));
- $event = $dispatcher->dispatch('example_form.submit', $example_event);
- error_log($event->getValue(), 0);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement