forked from Gizra/og
-
Notifications
You must be signed in to change notification settings - Fork 0
/
og.routing.yml
31 lines (29 loc) · 945 Bytes
/
og.routing.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# Routes for Organic groups.
og.subscribe:
path: 'group/{entity_type_id}/{group}/subscribe/{membership_type}'
defaults:
_controller: '\Drupal\og\Controller\SubscriptionController::subscribe'
_title: 'Join Group'
membership_type: default
requirements:
# Only authenticated users can subscribe to group, but we do allow anonymous
# users to reach this route. They will be redirect to login page or be given
# the correct page by the controller.
_access: 'TRUE'
options:
parameters:
group:
type: entity:{entity_type_id}
membership_type:
type: entity:og_membership_type
og.unsubscribe:
path: 'group/{entity_type_id}/{group}/unsubscribe'
defaults:
_controller: '\Drupal\og\Controller\SubscriptionController::unsubscribe'
_title: 'Leave Group'
requirements:
_user_is_logged_in: 'TRUE'
options:
parameters:
group:
type: entity:{entity_type_id}