Advertisement
Guest User

Untitled

a guest
Feb 12th, 2016
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. <?php
  2.  
  3. // ...
  4.  
  5. public function submitForm(array &$form, FormStateInterface $form_state)
  6. {
  7. $dispatcher = \Drupal::service('event_dispatcher');
  8. $example_event = new ExampleEvent($form_state->getValue('email'));
  9. $event = $dispatcher->dispatch('example_form.submit', $example_event);
  10. error_log($event->getValue(), 0);
  11. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement