You are here

public function RouteProcessor::processOutbound in Drupal 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

core/modules/path/src/Routing/RouteProcessor.php, line 35

Class

RouteProcessor
Processes the backwards-compatibility layer for path alias routes.

Namespace

Drupal\path\Routing

Code

public function processOutbound($route_name, Route $route, array &$parameters, BubbleableMetadata $bubbleable_metadata = NULL) {
  $redirected_route_names = [
    'path.admin_add' => 'entity.path_alias.add_form',
    'path.admin_edit' => 'entity.path_alias.edit_form',
    'path.delete' => 'entity.path_alias.delete_form',
    'path.admin_overview' => 'entity.path_alias.collection',
    'path.admin_overview_filter' => 'entity.path_alias.collection',
  ];
  if (in_array($route_name, array_keys($redirected_route_names), TRUE)) {
    @trigger_error("The '{$route_name}' route is deprecated in drupal:8.8.0 and is removed from drupal:9.0.0. Use the '{$redirected_route_names[$route_name]}' route instead. See https://www.drupal.org/node/3013865", E_USER_DEPRECATED);
    static::overwriteRoute($route, $this->routeProvider
      ->getRouteByName($redirected_route_names[$route_name]));
  }
}