function LinkGenerator::generateFromLink
Same name in other branches
- 8.9.x core/lib/Drupal/Core/Utility/LinkGenerator.php \Drupal\Core\Utility\LinkGenerator::generateFromLink()
- 10 core/lib/Drupal/Core/Utility/LinkGenerator.php \Drupal\Core\Utility\LinkGenerator::generateFromLink()
Overrides LinkGeneratorInterface::generateFromLink
File
-
core/
lib/ Drupal/ Core/ Utility/ LinkGenerator.php, line 63
Class
- LinkGenerator
- Provides a class which generates a link with route names and parameters.
Namespace
Drupal\Core\UtilityCode
public function generateFromLink(Link $link) {
return $this->generate($link->getText(), $link->getUrl());
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.