You are here

vud.routing.yml in Vote Up/Down 8

File

vud.routing.yml
View source
  1. vud.admin_advanced_settings:
  2. path: /admin/config/search/voteupdown
  3. defaults:
  4. _title: 'Vote Up/Down'
  5. _form: \Drupal\vud\Form\VudAdminAdvancedSettings
  6. requirements:
  7. _permission: 'administer vote up/down'
  8. vud.vote:
  9. path: /vote/{entity_type_id}/{entity_id}/{vote_value}/{widget_name}/{js}
  10. defaults:
  11. _controller: \Drupal\vud\Controller\VotingApiController::vote
  12. requirements:
  13. _custom_access: \Drupal\vud\Controller\VotingApiController::voteAccess
  14. entity_type_id: ^[A-z]+
  15. entity_id: ^[0-9_]+
  16. js: 'nojs|ajax'
  17. vote_value: ^[-]?1+
  18. _csrf_token: 'TRUE'
  19. options:
  20. _csrf_exclude_parameters: ['js']
  21. vud.reset:
  22. path: /votereset/{entity_type_id}/{entity_id}/{widget_name}/{js}
  23. defaults:
  24. _controller: \Drupal\vud\Controller\VotingApiController::resetVote
  25. requirements:
  26. _custom_access: \Drupal\vud\Controller\VotingApiController::resetVoteAccess
  27. entity_type_id: ^[A-z]+
  28. entity_id: ^[0-9_]+
  29. js: 'nojs|ajax'
  30. _csrf_token: 'TRUE'
  31. options:
  32. _csrf_exclude_parameters: ['js']