function LinkGenerator::generateFromLink
Same name in other branches
- 9 core/lib/Drupal/Core/Utility/LinkGenerator.php \Drupal\Core\Utility\LinkGenerator::generateFromLink()
- 8.9.x 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) {
@trigger_error('\\Drupal\\Core\\Utility\\LinkGeneratorInterface::generateFromLink() is deprecated in drupal:10.1.0 and is removed from drupal:11.0.0. Use \\Drupal\\Core\\Utility\\LinkGeneratorInterface::generate() instead. See https://www.drupal.org/node/3342992', E_USER_DEPRECATED);
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.