You are here

menu_example.services.yml in Examples for Developers 3.x

modules/menu_example/menu_example.services.yml

File

modules/menu_example/menu_example.services.yml
View source
  1. services:
  2. menu_example.access_check.role:
  3. class: Drupal\menu_example\Access\RoleAccessCheck
  4. arguments: ['@current_user']
  5. tags:
  6. - { name: access_check, applies_to: _menu_example_role }
  7. # _menu_example_role flaf is added to requirements section in
  8. # menu_example.routing.yml to apply custom check routes.
  9. menu_example.route_subscriber:
  10. class: Drupal\menu_example\Routing\RouteSubscriber
  11. tags:
  12. - { name: event_subscriber }