You are here

public function TeamPermission::alterRouteDefinition in Apigee Edge 8

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/apigee_edge_teams/src/Plugin/views/access/TeamPermission.php, line 113

Class

TeamPermission
Access plugin for team-permission-based access control.

Namespace

Drupal\apigee_edge_teams\Plugin\views\access

Code

public function alterRouteDefinition(Route $route) {
  $route
    ->setRequirement('_team_permission', $this->options['permission']);
}