function ConfigFieldMapper::getBaseRouteParameters

Same name in other branches
  1. 9 core/modules/config_translation/src/ConfigFieldMapper.php \Drupal\config_translation\ConfigFieldMapper::getBaseRouteParameters()
  2. 8.9.x core/modules/config_translation/src/ConfigFieldMapper.php \Drupal\config_translation\ConfigFieldMapper::getBaseRouteParameters()
  3. 10 core/modules/config_translation/src/ConfigFieldMapper.php \Drupal\config_translation\ConfigFieldMapper::getBaseRouteParameters()

Overrides ConfigEntityMapper::getBaseRouteParameters

File

core/modules/config_translation/src/ConfigFieldMapper.php, line 27

Class

ConfigFieldMapper
Configuration mapper for fields.

Namespace

Drupal\config_translation

Code

public function getBaseRouteParameters() {
    $parameters = parent::getBaseRouteParameters();
    $base_entity_info = $this->entityTypeManager
        ->getDefinition($this->pluginDefinition['base_entity_type']);
    $bundle_parameter_key = $base_entity_info->getBundleEntityType() ?: 'bundle';
    $parameters[$bundle_parameter_key] = $this->entity
        ->getTargetBundle();
    return $parameters;
}

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