You are here

public function Shortcut::getUrl in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/shortcut/src/Entity/Shortcut.php \Drupal\shortcut\Entity\Shortcut::getUrl()

Returns the URL object pointing to the configured route.

Return value

\Drupal\Core\Url The URL object.

Overrides ShortcutInterface::getUrl

File

core/modules/shortcut/src/Entity/Shortcut.php, line 92

Class

Shortcut
Defines the shortcut entity class.

Namespace

Drupal\shortcut\Entity

Code

public function getUrl() {
  return $this->link
    ->first()
    ->getUrl();
}