public function Permission::alterRouteDefinition in Drupal 8
Same name and namespace in other branches
- 9 core/modules/user/src/Plugin/views/access/Permission.php \Drupal\user\Plugin\views\access\Permission::alterRouteDefinition()
- 10 core/modules/user/src/Plugin/views/access/Permission.php \Drupal\user\Plugin\views\access\Permission::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/ user/ src/ Plugin/ views/ access/ Permission.php, line 90
Class
- Permission
- Access plugin that provides permission-based access control.
Namespace
Drupal\user\Plugin\views\accessCode
public function alterRouteDefinition(Route $route) {
$route
->setRequirement('_permission', $this->options['perm']);
}