public function ViewJobAccess::alterRouteDefinition in Translation Management Tool 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
- src/
Plugin/ views/ access/ ViewJobAccess.php, line 47
Class
- ViewJobAccess
- Access plugin that checks multiple permissions.
Namespace
Drupal\tmgmt\Plugin\views\accessCode
public function alterRouteDefinition(Route $route) {
$route
->setRequirement('_permission', (string) implode('+', $this->permissions));
}