function FieldConfig::urlRouteParameters

Same name in other branches
  1. 8.9.x core/modules/field/src/Entity/FieldConfig.php \Drupal\field\Entity\FieldConfig::urlRouteParameters()
  2. 10 core/modules/field/src/Entity/FieldConfig.php \Drupal\field\Entity\FieldConfig::urlRouteParameters()
  3. 11.x core/modules/field/src/Entity/FieldConfig.php \Drupal\field\Entity\FieldConfig::urlRouteParameters()

Overrides EntityBase::urlRouteParameters

File

core/modules/field/src/Entity/FieldConfig.php, line 277

Class

FieldConfig
Defines the Field entity.

Namespace

Drupal\field\Entity

Code

protected function urlRouteParameters($rel) {
    $parameters = parent::urlRouteParameters($rel);
    $entity_type = \Drupal::entityTypeManager()->getDefinition($this->entity_type);
    $bundle_parameter_key = $entity_type->getBundleEntityType() ?: 'bundle';
    $parameters[$bundle_parameter_key] = $this->bundle;
    return $parameters;
}

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