public LinkGenerator::generateFromLink(Link $link)
Renders a link from a link object.
@internal Should not be used in user code. Use \Drupal\Core\Link instead.
\Drupal\Core\Link $link: A link object to convert to a string.
\Drupal\Core\GeneratedLink A GeneratedLink object containing a link to the given route and parameters and bubbleable metadata.
Overrides LinkGeneratorInterface::generateFromLink
public function generateFromLink(Link $link) { return $this->generate($link->getText(), $link->getUrl()); }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Utility!LinkGenerator.php/function/LinkGenerator::generateFromLink/8.1.x