X-Git-Url: http://www.aleph1.co.uk/gitweb/?a=blobdiff_plain;ds=sidebyside;f=web%2Fcore%2Flib%2FDrupal%2FCore%2FEntity%2FEntityDisplayModeBase.php;fp=web%2Fcore%2Flib%2FDrupal%2FCore%2FEntity%2FEntityDisplayModeBase.php;h=fe7f105e10a60f3412e0965f847e3d1fceb4518d;hb=9917807b03b64faf00f6a1f29dcb6eafc454efa5;hp=0ec97b7e8ab74862cd067c04b44d1d133af83ae6;hpb=aea91e65e895364e460983b890e295aa5d5540a5;p=yaffs-website diff --git a/web/core/lib/Drupal/Core/Entity/EntityDisplayModeBase.php b/web/core/lib/Drupal/Core/Entity/EntityDisplayModeBase.php index 0ec97b7e8..fe7f105e1 100644 --- a/web/core/lib/Drupal/Core/Entity/EntityDisplayModeBase.php +++ b/web/core/lib/Drupal/Core/Entity/EntityDisplayModeBase.php @@ -107,4 +107,16 @@ abstract class EntityDisplayModeBase extends ConfigEntityBase implements EntityD \Drupal::entityManager()->clearCachedFieldDefinitions(); } + /** + * {@inheritdoc} + */ + protected function urlRouteParameters($rel) { + $uri_route_parameters = parent::urlRouteParameters($rel); + if ($rel === 'add-form') { + $uri_route_parameters['entity_type_id'] = $this->getTargetType(); + } + + return $uri_route_parameters; + } + }