diff --git a/core/modules/shortcut/shortcut.module b/core/modules/shortcut/shortcut.module index f21d00fa9365d2ef0eebaed3ed8aa8753bf2611f..e0b11ea9c2afdff9d400f71ecf775cc44c26df3e 100644 --- a/core/modules/shortcut/shortcut.module +++ b/core/modules/shortcut/shortcut.module @@ -258,7 +258,7 @@ function shortcut_renderable_links($shortcut_set = NULL) { $shortcut = \Drupal::entityManager()->getTranslationFromContext($shortcut); $links[] = array( 'title' => $shortcut->label(), - 'url' => Url::fromRoute($shortcut->getRouteName(), $shortcut->getRouteParams()), + 'url' => Url::fromRoute($shortcut->getRouteName(), $shortcut->getRouteParameters()), ); $cache_tags = Cache::mergeTags($cache_tags, $shortcut->getCacheTag()); } @@ -314,7 +314,7 @@ function shortcut_preprocess_page(&$variables) { // Check if $link is already a shortcut and set $link_mode accordingly. $shortcuts = \Drupal::entityManager()->getStorage('shortcut')->loadByProperties(array('shortcut_set' => $shortcut_set->id())); foreach ($shortcuts as $shortcut) { - if ($shortcut->getRouteName() == $url->getRouteName() && $shortcut->getRouteParams() == $url->getRouteParameters()) { + if ($shortcut->getRouteName() == $url->getRouteName() && $shortcut->getRouteParameters() == $url->getRouteParameters()) { $shortcut_id = $shortcut->id(); break; } diff --git a/core/modules/shortcut/src/Entity/Shortcut.php b/core/modules/shortcut/src/Entity/Shortcut.php index 9734109fcd368cbdfb74fefcd1f5e911bdb9933f..087b6501ab201c7fb9ba5aa6c717893bfe963f51 100644 --- a/core/modules/shortcut/src/Entity/Shortcut.php +++ b/core/modules/shortcut/src/Entity/Shortcut.php @@ -86,7 +86,7 @@ public function setWeight($weight) { * {@inheritdoc} */ public function getUrl() { - return new Url($this->getRouteName(), $this->getRouteParams()); + return new Url($this->getRouteName(), $this->getRouteParameters()); } /** @@ -107,14 +107,14 @@ public function setRouteName($route_name) { /** * {@inheritdoc} */ - public function getRouteParams() { + public function getRouteParameters() { return $this->get('route_parameters')->first()->getValue(); } /** * {@inheritdoc} */ - public function setRouteParams($route_parameters) { + public function setRouteParameters($route_parameters) { $this->set('route_parameters', $route_parameters); return $this; } @@ -146,7 +146,7 @@ public function preSave(EntityStorageInterface $storage) { $url = Url::createFromRequest(Request::create("/{$this->path->value}")); } $this->setRouteName($url->getRouteName()); - $this->setRouteParams($url->getRouteParameters()); + $this->setRouteParameters($url->getRouteParameters()); } /** diff --git a/core/modules/shortcut/src/ShortcutInterface.php b/core/modules/shortcut/src/ShortcutInterface.php index 90d90f924034e4355df27695efe081f035155285..c074b838e362d7b7d747bfe82890bb3de441abb1 100644 --- a/core/modules/shortcut/src/ShortcutInterface.php +++ b/core/modules/shortcut/src/ShortcutInterface.php @@ -85,7 +85,7 @@ public function setRouteName($route_name); * @return array * The route parameters of this shortcut. */ - public function getRouteParams(); + public function getRouteParameters(); /** * Sets the route parameters associated with this shortcut. @@ -96,6 +96,6 @@ public function getRouteParams(); * @return \Drupal\shortcut\ShortcutInterface * The called shortcut entity. */ - public function setRouteParams($route_parameters); + public function setRouteParameters($route_parameters); } diff --git a/core/modules/shortcut/src/ShortcutPathValue.php b/core/modules/shortcut/src/ShortcutPathValue.php index 3d88d9b01c6b3aecf7376f88645967f1836d5c94..8d05b7d88d7cffad65651f24d2b210c89e5dc3ca 100644 --- a/core/modules/shortcut/src/ShortcutPathValue.php +++ b/core/modules/shortcut/src/ShortcutPathValue.php @@ -25,7 +25,7 @@ public function getValue() { $entity = $this->parent->getEntity(); if ($route_name = $entity->getRouteName()) { - $path = \Drupal::urlGenerator()->getPathFromRoute($route_name, $entity->getRouteParams()); + $path = \Drupal::urlGenerator()->getPathFromRoute($route_name, $entity->getRouteParameters()); $this->value = trim($path, '/'); } else {