function EntityDisplayModeBase::urlRouteParameters

Same name in other branches
  1. 9 core/lib/Drupal/Core/Entity/EntityDisplayModeBase.php \Drupal\Core\Entity\EntityDisplayModeBase::urlRouteParameters()
  2. 8.9.x core/lib/Drupal/Core/Entity/EntityDisplayModeBase.php \Drupal\Core\Entity\EntityDisplayModeBase::urlRouteParameters()
  3. 11.x core/lib/Drupal/Core/Entity/EntityDisplayModeBase.php \Drupal\Core\Entity\EntityDisplayModeBase::urlRouteParameters()

Overrides EntityBase::urlRouteParameters

File

core/lib/Drupal/Core/Entity/EntityDisplayModeBase.php, line 120

Class

EntityDisplayModeBase
Base class for config entity types with settings for form and view modes.

Namespace

Drupal\Core\Entity

Code

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;
}

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