function AccessPluginBase::alterRouteDefinition

Same name in other branches
  1. 8.9.x core/modules/views/src/Plugin/views/access/AccessPluginBase.php \Drupal\views\Plugin\views\access\AccessPluginBase::alterRouteDefinition()
  2. 10 core/modules/views/src/Plugin/views/access/AccessPluginBase.php \Drupal\views\Plugin\views\access\AccessPluginBase::alterRouteDefinition()
  3. 11.x core/modules/views/src/Plugin/views/access/AccessPluginBase.php \Drupal\views\Plugin\views\access\AccessPluginBase::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.

5 methods override AccessPluginBase::alterRouteDefinition()
CacheableMetadataCalculationTest::alterRouteDefinition in core/modules/views/tests/modules/views_test_cacheable_metadata_calculation/src/Plugin/views/access/CacheableMetadataCalculationTest.php
Allows access plugins to alter the route definition of a view.
None::alterRouteDefinition in core/modules/views/src/Plugin/views/access/None.php
Allows access plugins to alter the route definition of a view.
Permission::alterRouteDefinition in core/modules/user/src/Plugin/views/access/Permission.php
Allows access plugins to alter the route definition of a view.
Role::alterRouteDefinition in core/modules/user/src/Plugin/views/access/Role.php
Allows access plugins to alter the route definition of a view.
StaticTest::alterRouteDefinition in core/modules/views/tests/modules/views_test_data/src/Plugin/views/access/StaticTest.php
Allows access plugins to alter the route definition of a view.

File

core/modules/views/src/Plugin/views/access/AccessPluginBase.php, line 75

Class

AccessPluginBase
The base plugin to handle access control.

Namespace

Drupal\views\Plugin\views\access

Code

public abstract function alterRouteDefinition(Route $route);

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.