function Link::setUrl

Same name in other branches
  1. 9 core/lib/Drupal/Core/Link.php \Drupal\Core\Link::setUrl()
  2. 10 core/lib/Drupal/Core/Link.php \Drupal\Core\Link::setUrl()
  3. 11.x core/lib/Drupal/Core/Link.php \Drupal\Core\Link::setUrl()

Sets the URL of this link.

Parameters

Url $url: The URL object to set

Return value

$this

File

core/lib/Drupal/Core/Link.php, line 119

Class

Link
Defines an object that holds information about a link.

Namespace

Drupal\Core

Code

public function setUrl(Url $url) {
    $this->url = $url;
    return $this;
}

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