protected function FieldConfig::urlRouteParameters in Drupal 8
Same name and namespace in other branches
- 9 core/modules/field/src/Entity/FieldConfig.php \Drupal\field\Entity\FieldConfig::urlRouteParameters()
Gets an array of placeholders for this entity.
Individual entity classes may override this method to add additional placeholders if desired. If so, they should be sure to replicate the property caching logic.
Parameters
string $rel: The link relationship type, for example: canonical or edit-form.
Return value
array An array of URI placeholders.
Overrides EntityBase::urlRouteParameters
File
- core/
modules/ field/ src/ Entity/ FieldConfig.php, line 274
Class
- FieldConfig
- Defines the Field entity.
Namespace
Drupal\field\EntityCode
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;
}