You are here

og.routing.yml in Organic groups 8

File

og.routing.yml
View source
  1. # Routes for Organic groups.
  2. og.subscribe:
  3. path: 'group/{entity_type_id}/{group}/subscribe/{membership_type}'
  4. defaults:
  5. _controller: '\Drupal\og\Controller\SubscriptionController::subscribe'
  6. _title: 'Join Group'
  7. membership_type: default
  8. requirements:
  9. # Only authenticated users can subscribe to group, but we do allow anonymous
  10. # users to reach this route. They will be redirect to login page or be given
  11. # the correct page by the controller.
  12. _access: 'TRUE'
  13. options:
  14. parameters:
  15. group:
  16. type: entity:{entity_type_id}
  17. membership_type:
  18. type: entity:og_membership_type
  19. og.unsubscribe:
  20. path: 'group/{entity_type_id}/{group}/unsubscribe'
  21. defaults:
  22. _controller: '\Drupal\og\Controller\SubscriptionController::unsubscribe'
  23. _title: 'Leave Group'
  24. requirements:
  25. _user_is_logged_in: 'TRUE'
  26. options:
  27. parameters:
  28. group:
  29. type: entity:{entity_type_id}
  30. og.add_multiple_roles_confirm:
  31. path: '/group/roles/add'
  32. defaults:
  33. _form: '\Drupal\og\Form\OgAddMultipleRolesForm'
  34. requirements:
  35. _custom_access: '\Drupal\og\Form\OgAddMultipleRolesForm::access'
  36. og.remove_multiple_roles_confirm:
  37. path: '/group/roles/remove'
  38. defaults:
  39. _form: '\Drupal\og\Form\OgRemoveMultipleRolesForm'
  40. requirements:
  41. _custom_access: '\Drupal\og\Form\OgRemoveMultipleRolesForm::access'