Same name and namespace in other branches
  1. 8.9.x core/modules/link/src/LinkItemInterface.php \Drupal\link\LinkItemInterface::getUrl()
  2. 9 core/modules/link/src/LinkItemInterface.php \Drupal\link\LinkItemInterface::getUrl()

Gets the URL object.

Return value

\Drupal\Core\Url Returns a Url object.

Throws

\InvalidArgumentException Thrown when there is a problem with field data.

File

core/modules/link/src/LinkItemInterface.php, line 44

Class

LinkItemInterface
Defines an interface for the link field item.

Namespace

Drupal\link

Code

public function getUrl();