You are here

protected function PageVariantConfigMapper::processRoute in Page Manager 8.4

Same name and namespace in other branches
  1. 8 page_manager_ui/src/ConfigTranslation/PageVariantConfigMapper.php \Drupal\page_manager_ui\ConfigTranslation\PageVariantConfigMapper::processRoute()

Allows to process all config translation routes.

Parameters

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

Overrides ConfigEntityMapper::processRoute

File

page_manager_ui/src/ConfigTranslation/PageVariantConfigMapper.php, line 18

Class

PageVariantConfigMapper
Configuration mapper for page variants.

Namespace

Drupal\page_manager_ui\ConfigTranslation

Code

protected function processRoute(Route $route) {
  parent::processRoute($route);

  // Change the paths for config translation routes to outside the wizard.
  $path = $route
    ->getPath();
  $path = str_replace('manage/{machine_name}/{step}', '{page}/{page_variant}', $path);
  $route
    ->setPath($path);
}