public function ConnectionAccess::alterRouteDefinition in RedHen CRM 8
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
- modules/
redhen_connection/ src/ Plugin/ views/ access/ ConnectionAccess.php, line 78
Class
- ConnectionAccess
- Access plugin for RedHen Connections.
Namespace
Drupal\redhen_connection\Plugin\views\accessCode
public function alterRouteDefinition(Route $route) {
$operation = $this->options['operation'] ?? 'view';
$route
->setRequirement('_redhen_connection_access', $operation);
}