events_example.services.yml

Same filename in other branches
  1. 8.x-1.x events_example/events_example.services.yml
  2. 4.0.x modules/events_example/events_example.services.yml
modules/events_example/events_example.services.yml

File

modules/events_example/events_example.services.yml

View source
  1. # Subscribing to an event requires you to create a new service tagged with the
  2. # 'event_subscriber' tag. This tells the service container, and by proxy the
  3. # event dispatcher service, that the class registered here can be queried to get
  4. # a list of events that it would like to be notified about.
  5. #
  6. # For more on defining and tagging services see
  7. # https://api.drupal.org/api/drupal/core%21core.api.php/group/container/8.2.x
  8. services:
  9. # Give your service a unique name, convention is to prefix service names with
  10. # the name of the module that implements them.
  11. events_example_subscriber:
  12. # Point to the class that will contain your implementation of
  13. # \Symfony\Component\EventDispatcher\EventSubscriberInterface
  14. class: Drupal\events_example\EventSubscriber\EventsExampleSubscriber
  15. tags:
  16. - {name: event_subscriber}

Services

Title Deprecated Summary
events_example_subscriber Drupal\events_example\EventSubscriber\EventsExampleSubscriber