You are here

public function ManageByGroupManagersOnlyAccess::alterRouteDefinition in Open Social 8.7

Same name and namespace in other branches
  1. 8.9 modules/social_features/social_group/src/Plugin/views/access/ManageByGroupManagersOnlyAccess.php \Drupal\social_group\Plugin\views\access\ManageByGroupManagersOnlyAccess::alterRouteDefinition()
  2. 8.5 modules/social_features/social_group/src/Plugin/views/access/ManageByGroupManagersOnlyAccess.php \Drupal\social_group\Plugin\views\access\ManageByGroupManagersOnlyAccess::alterRouteDefinition()
  3. 8.6 modules/social_features/social_group/src/Plugin/views/access/ManageByGroupManagersOnlyAccess.php \Drupal\social_group\Plugin\views\access\ManageByGroupManagersOnlyAccess::alterRouteDefinition()
  4. 8.8 modules/social_features/social_group/src/Plugin/views/access/ManageByGroupManagersOnlyAccess.php \Drupal\social_group\Plugin\views\access\ManageByGroupManagersOnlyAccess::alterRouteDefinition()
  5. 10.3.x modules/social_features/social_group/src/Plugin/views/access/ManageByGroupManagersOnlyAccess.php \Drupal\social_group\Plugin\views\access\ManageByGroupManagersOnlyAccess::alterRouteDefinition()
  6. 10.0.x modules/social_features/social_group/src/Plugin/views/access/ManageByGroupManagersOnlyAccess.php \Drupal\social_group\Plugin\views\access\ManageByGroupManagersOnlyAccess::alterRouteDefinition()
  7. 10.1.x modules/social_features/social_group/src/Plugin/views/access/ManageByGroupManagersOnlyAccess.php \Drupal\social_group\Plugin\views\access\ManageByGroupManagersOnlyAccess::alterRouteDefinition()
  8. 10.2.x modules/social_features/social_group/src/Plugin/views/access/ManageByGroupManagersOnlyAccess.php \Drupal\social_group\Plugin\views\access\ManageByGroupManagersOnlyAccess::alterRouteDefinition()

Allows access plugins to alter the route definition of a view.

Likely the access plugin will add new requirements, so its custom access checker can be applied.

Parameters

\Symfony\Component\Routing\Route $route: The route to change.

Overrides AccessPluginBase::alterRouteDefinition

File

modules/social_features/social_group/src/Plugin/views/access/ManageByGroupManagersOnlyAccess.php, line 33

Class

ManageByGroupManagersOnlyAccess
Manage by Group Managers only access plugin.

Namespace

Drupal\social_group\Plugin\views\access

Code

public function alterRouteDefinition(Route $route) {
  $route
    ->setRequirement('_custom_access', '\\Drupal\\social_group\\Controller\\GroupManagersController::access');
}