function 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 170

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);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.