You are here

public function None::alterRouteDefinition in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/views/src/Plugin/views/access/None.php \Drupal\views\Plugin\views\access\None::alterRouteDefinition()
  2. 10 core/modules/views/src/Plugin/views/access/None.php \Drupal\views\Plugin\views\access\None::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

core/modules/views/src/Plugin/views/access/None.php, line 39

Class

None
Access plugin that provides no access control at all.

Namespace

Drupal\views\Plugin\views\access

Code

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