public function LinkGenerator::generateFromLink in Drupal 10
Same name and namespace in other branches
- 8 core/lib/Drupal/Core/Utility/LinkGenerator.php \Drupal\Core\Utility\LinkGenerator::generateFromLink()
- 9 core/lib/Drupal/Core/Utility/LinkGenerator.php \Drupal\Core\Utility\LinkGenerator::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());
}