You are here

protected function EntityViewMode::urlRouteParameters in Lightning Core 8

Same name and namespace in other branches
  1. 8.5 src/Entity/EntityViewMode.php \Drupal\lightning_core\Entity\EntityViewMode::urlRouteParameters()
  2. 8.2 src/Entity/EntityViewMode.php \Drupal\lightning_core\Entity\EntityViewMode::urlRouteParameters()
  3. 8.3 src/Entity/EntityViewMode.php \Drupal\lightning_core\Entity\EntityViewMode::urlRouteParameters()
  4. 8.4 src/Entity/EntityViewMode.php \Drupal\lightning_core\Entity\EntityViewMode::urlRouteParameters()

This should be removed before Lightning 2.2.0. See https://www.drupal.org/node/2907654

Overrides EntityDisplayModeBase::urlRouteParameters

File

src/Entity/EntityViewMode.php, line 22

Class

EntityViewMode
Adds description support to entity view modes.

Namespace

Drupal\lightning_core\Entity

Code

protected function urlRouteParameters($rel) {
  $parameters = parent::urlRouteParameters($rel);
  if (empty($parameters['entity_type_id'])) {
    $parameters['entity_type_id'] = $this
      ->getTargetType();
  }
  return $parameters;
}