You are here

public function LinkItem::getUrl in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/link/src/Plugin/Field/FieldType/LinkItem.php \Drupal\link\Plugin\Field\FieldType\LinkItem::getUrl()

Gets the URL object.

Return value

\Drupal\Core\Url Returns a Url object.

Overrides LinkItemInterface::getUrl

File

core/modules/link/src/Plugin/Field/FieldType/LinkItem.php, line 173

Class

LinkItem
Plugin implementation of the 'link' field type.

Namespace

Drupal\link\Plugin\Field\FieldType

Code

public function getUrl() {
  return Url::fromUri($this->uri, (array) $this->options);
}