Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. EntityDisplayModeBase.php

function EntityDisplayModeBase::urlRouteParameters

Overrides EntityBase::urlRouteParameters

File

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

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;
}
RSS feed
Powered by Drupal