You are here

public function DomainSourcePathProcessor::allowedRoute in Domain Access 8

Checks that a route's common name is not disallowed.

Looks at the name (e.g. canonical) of the route without regard for the entity type.

@parameter $name The route name being checked.

Return value

bool Returns TRUE when allowed, otherwise FALSE.

1 call to DomainSourcePathProcessor::allowedRoute()
DomainSourcePathProcessor::processOutbound in domain_source/src/HttpKernel/DomainSourcePathProcessor.php
Processes the outbound path.

File

domain_source/src/HttpKernel/DomainSourcePathProcessor.php, line 222

Class

DomainSourcePathProcessor
Processes the outbound path using path alias lookups.

Namespace

Drupal\domain_source\HttpKernel

Code

public function allowedRoute($name) {
  $excluded = $this
    ->getExcludedRoutes();
  $parts = explode('.', $name);
  $route_name = end($parts);

  // Config is stored as an array. Empty items are not excluded.
  return !isset($excluded[$route_name]);
}