public function Permission::alterRouteDefinition in Zircon Profile 8.0
Same name and namespace in other branches
- 8 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 95 - Contains \Drupal\user\Plugin\views\access\Permission.
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']);
}