class SocialGroupRequestRouteSubscriber in Open Social 8.9
Same name and namespace in other branches
- 10.3.x modules/social_features/social_group/modules/social_group_request/src/Routing/SocialGroupRequestRouteSubscriber.php \Drupal\social_group_request\Routing\SocialGroupRequestRouteSubscriber
- 10.0.x modules/social_features/social_group/modules/social_group_request/src/Routing/SocialGroupRequestRouteSubscriber.php \Drupal\social_group_request\Routing\SocialGroupRequestRouteSubscriber
- 10.1.x modules/social_features/social_group/modules/social_group_request/src/Routing/SocialGroupRequestRouteSubscriber.php \Drupal\social_group_request\Routing\SocialGroupRequestRouteSubscriber
- 10.2.x modules/social_features/social_group/modules/social_group_request/src/Routing/SocialGroupRequestRouteSubscriber.php \Drupal\social_group_request\Routing\SocialGroupRequestRouteSubscriber
Class SocialGroupRequestRouteSubscriber.
Hierarchy
- class \Drupal\Core\Routing\RouteSubscriberBase implements \Symfony\Component\EventDispatcher\EventSubscriberInterface
- class \Drupal\social_group_request\Routing\SocialGroupRequestRouteSubscriber
Expanded class hierarchy of SocialGroupRequestRouteSubscriber
1 string reference to 'SocialGroupRequestRouteSubscriber'
- social_group_request.services.yml in modules/
social_features/ social_group/ modules/ social_group_request/ social_group_request.services.yml - modules/social_features/social_group/modules/social_group_request/social_group_request.services.yml
1 service uses SocialGroupRequestRouteSubscriber
- social_group_request.route_subscriber in modules/
social_features/ social_group/ modules/ social_group_request/ social_group_request.services.yml - Drupal\social_group_request\Routing\SocialGroupRequestRouteSubscriber
File
- modules/
social_features/ social_group/ modules/ social_group_request/ src/ Routing/ SocialGroupRequestRouteSubscriber.php, line 13
Namespace
Drupal\social_group_request\RoutingView source
class SocialGroupRequestRouteSubscriber extends RouteSubscriberBase {
/**
* {@inheritdoc}
*/
protected function alterRoutes(RouteCollection $collection) {
if ($route = $collection
->get('grequest.request_membership')) {
$route
->setDefaults([
'_controller' => GroupRequestController::class . '::requestMembership',
]);
}
if ($route = $collection
->get('grequest.group_request_membership_approve')) {
$route
->setDefaults([
'_title_callback' => GroupRequestController::class . '::getTitleApproveRequest',
'_controller' => GroupRequestController::class . '::approveRequest',
]);
}
if ($route = $collection
->get('grequest.group_request_membership_reject')) {
$route
->setDefaults([
'_title_callback' => GroupRequestController::class . '::getTitleRejectRequest',
'_form' => GroupRequestMembershipRejectForm::class,
]);
}
if ($route = $collection
->get('view.group_pending_members.page_1')) {
$route
->setRequirements([
'_custom_access' => GroupRequestController::class . '::routeAccess',
]);
}
if ($route = $collection
->get('view.group_pending_members.membership_requests')) {
$route
->setRequirements([
'_custom_access' => GroupRequestController::class . '::routeAccess',
]);
}
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
RouteSubscriberBase:: |
public static | function | Returns an array of event names this subscriber wants to listen to. | 5 |
RouteSubscriberBase:: |
public | function | Delegates the route altering to self::alterRoutes(). | 1 |
SocialGroupRequestRouteSubscriber:: |
protected | function |
Alters existing routes for a specific collection. Overrides RouteSubscriberBase:: |