You are here

public function Scheduler::alterRouteDefinition in Scheduler 8

Same name and namespace in other branches
  1. 2.x src/Plugin/views/access/Scheduler.php \Drupal\scheduler\Plugin\views\access\Scheduler::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

src/Plugin/views/access/Scheduler.php, line 34

Class

Scheduler
Access plugin that provides access control for Scheduler.

Namespace

Drupal\scheduler\Plugin\views\access

Code

public function alterRouteDefinition(Route $route) {
  $route
    ->setRequirement('_access_scheduler_content', 'TRUE');
}