You are here

EventSubscriber.html.twig in Drupal 7 to 8/9 Module Upgrader 8

Contains \Drupal\{{ module }}\EventSubscriber\{{ class }}.

File

templates/EventSubscriber.html.twig
View source
  1. /**
  2. * @file
  3. * Contains \Drupal\{{ module }}\EventSubscriber\{{ class }}.
  4. */
  5. namespace Drupal\{{ module }}\EventSubscriber;
  6. use Symfony\Component\HttpKernel\KernelEvents;
  7. use Symfony\Component\EventDispatcher\EventSubscriberInterface;
  8. class {{ class }} implements EventSubscriberInterface {
  9. /**
  10. * {@inheritdoc}
  11. */
  12. public static function getSubscribedEvents() {
  13. return [ {{ event }} => ['onEvent', {{ priority }}]];
  14. }
  15. }