You are here

public function DomainEditorAccess::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/DomainEditorAccess.php, line 25

Class

DomainEditorAccess
Access plugin that provides domain assignment access control.

Namespace

Drupal\domain_content\Plugin\views\access

Code

public function alterRouteDefinition(Route $route) {
  parent::alterRouteDefinition($route);
  $route
    ->setRequirement('_permission', 'access domain content editors');
}