You are here

public function ConfigFieldMapper::getBaseRouteParameters in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/config_translation/src/ConfigFieldMapper.php \Drupal\config_translation\ConfigFieldMapper::getBaseRouteParameters()

Returns the route parameters for the base route the mapper is attached to.

Return value

array

Overrides ConfigEntityMapper::getBaseRouteParameters

File

core/modules/config_translation/src/ConfigFieldMapper.php, line 32
Contains \Drupal\config_translation\ConfigFieldMapper.

Class

ConfigFieldMapper
Configuration mapper for fields.

Namespace

Drupal\config_translation

Code

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