public function Domain::alterRouteDefinition in Domain Access 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
- domain/
src/ Plugin/ views/ access/ Domain.php, line 90
Class
- Domain
- Access plugin that provides domain-based access control.
Namespace
Drupal\domain\Plugin\views\accessCode
public function alterRouteDefinition(Route $route) {
if ($this->options['domain']) {
$route
->setRequirement('_domain', (string) implode('+', $this->options['domain']));
}
}