public function DomainContentAccess::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 DomainAccessContent::alterRouteDefinition
File
- domain_content/
src/ Plugin/ views/ access/ DomainContentAccess.php, line 25
Class
- DomainContentAccess
- Access plugin that provides domain-editing access control.
Namespace
Drupal\domain_content\Plugin\views\accessCode
public function alterRouteDefinition(Route $route) {
parent::alterRouteDefinition($route);
$route
->setRequirement('_permission', 'access domain content');
}