You are here

poll.routing.yml in Poll 8

File

poll.routing.yml
View source
  1. poll.poll_list:
  2. path: '/admin/content/poll'
  3. defaults:
  4. _entity_list: 'poll'
  5. _title: 'Polls'
  6. requirements:
  7. _permission: 'administer polls'
  8. poll.poll_add:
  9. path: '/poll/add'
  10. defaults:
  11. _entity_form: 'poll.default'
  12. _title: 'Add poll'
  13. options:
  14. _admin_route: TRUE
  15. requirements:
  16. _entity_create_access: 'poll'
  17. entity.poll.edit_form:
  18. path: '/poll/{poll}/edit'
  19. options:
  20. _admin_route: TRUE
  21. defaults:
  22. _entity_form: 'poll.edit'
  23. requirements:
  24. _entity_access: 'poll.update'
  25. entity.poll.delete_form:
  26. path: '/poll/{poll}/delete'
  27. defaults:
  28. _entity_form: 'poll.delete'
  29. _title: 'Delete form'
  30. requirements:
  31. _entity_access: 'poll.delete'
  32. entity.poll.canonical:
  33. path: '/poll/{poll}'
  34. defaults:
  35. _entity_view: 'poll'
  36. _title_callback: '\Drupal\poll\Controller\PollController::pollTitle'
  37. requirements:
  38. _entity_access: 'poll.view'
  39. poll.poll_vote_delete:
  40. path: '/poll/{poll}/delete/vote/{user}'
  41. defaults:
  42. _entity_form: 'poll.delete_vote'
  43. _title: 'Delete vote'
  44. requirements:
  45. # @todo Add custom access check to verify that user is allowed to delete
  46. # the vote of that user.
  47. _permission: 'access polls'
  48. poll.settings:
  49. path: '/admin/config/content/poll'
  50. defaults:
  51. _form: '\Drupal\poll\Form\PollSettingsForm'
  52. _title: 'Poll settings'
  53. requirements:
  54. _permission: 'administer polls'