You are here

public function ConfigNamesMapper::getAddRoute in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/config_translation/src/ConfigNamesMapper.php \Drupal\config_translation\ConfigNamesMapper::getAddRoute()
  2. 10 core/modules/config_translation/src/ConfigNamesMapper.php \Drupal\config_translation\ConfigNamesMapper::getAddRoute()

Returns the route object for a translation add form route.

Return value

\Symfony\Component\Routing\Route The route object for the translation page.

Overrides ConfigMapperInterface::getAddRoute

File

core/modules/config_translation/src/ConfigNamesMapper.php, line 286

Class

ConfigNamesMapper
Configuration mapper base implementation.

Namespace

Drupal\config_translation

Code

public function getAddRoute() {
  $route = new Route($this
    ->getBaseRoute()
    ->getPath() . '/translate/{langcode}/add', [
    '_form' => '\\Drupal\\config_translation\\Form\\ConfigTranslationAddForm',
    'plugin_id' => $this
      ->getPluginId(),
  ], [
    '_config_translation_form_access' => 'TRUE',
  ]);
  $this
    ->processRoute($route);
  return $route;
}