function ConfigEntityMapper::processRoute

Same name in other branches
  1. 9 core/modules/config_translation/src/ConfigEntityMapper.php \Drupal\config_translation\ConfigEntityMapper::processRoute()
  2. 10 core/modules/config_translation/src/ConfigEntityMapper.php \Drupal\config_translation\ConfigEntityMapper::processRoute()
  3. 11.x core/modules/config_translation/src/ConfigEntityMapper.php \Drupal\config_translation\ConfigEntityMapper::processRoute()

Overrides ConfigNamesMapper::processRoute

File

core/modules/config_translation/src/ConfigEntityMapper.php, line 276

Class

ConfigEntityMapper
Configuration mapper for configuration entities.

Namespace

Drupal\config_translation

Code

protected function processRoute(Route $route) {
    // Add entity upcasting information.
    $parameters = $route->getOption('parameters') ?: [];
    $parameters += [
        $this->entityType => [
            'type' => 'entity:' . $this->entityType,
        ],
    ];
    $route->setOption('parameters', $parameters);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.