You are here

public function Link::toString in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/lib/Drupal/Core/Link.php \Drupal\Core\Link::toString()

Generates the HTML for this Link object.

Return value

\Drupal\Core\GeneratedLink The link HTML markup.

Deprecated

in Drupal 8.0.x-dev, will be removed before Drupal 9.0.0. Use self::toRenderable() instead.

File

core/lib/Drupal/Core/Link.php, line 149
Contains \Drupal\Core\Link.

Class

Link
Defines an object that holds information about a link.

Namespace

Drupal\Core

Code

public function toString() {
  return $this
    ->getLinkGenerator()
    ->generateFromLink($this);
}