You are here

public function PurlContextOutboundRouteProcessor::processOutbound in Persistent URL 8

Processes the outbound route.

Parameters

string $route_name: The route name.

\Symfony\Component\Routing\Route $route: The outbound route to process.

array $parameters: An array of parameters to be passed to the route compiler. Passed by reference.

\Drupal\Core\Render\BubbleableMetadata $bubbleable_metadata: (optional) Object to collect route processors' bubbleable metadata.

Return value

The processed path.

Overrides OutboundRouteProcessorInterface::processOutbound

File

src/RouteProcessor/PurlContextOutboundRouteProcessor.php, line 38

Class

PurlContextOutboundRouteProcessor

Namespace

Drupal\purl\RouteProcessor

Code

public function processOutbound($route_name, Route $route, array &$parameters, BubbleableMetadata $bubbleable_metadata = NULL) {
  foreach ($this->events as $event) {
    $method = $this->manager
      ->getMethodPlugin($event
      ->getMethod());
    if ($method instanceof OutboundRouteAlteringInterface) {
      $path = $method
        ->alterOutboundRoute($route_name, $event
        ->getModifier(), $route, $parameters, $bubbleable_metadata);
    }
  }
}