Commit 9993a87d authored by alexpott's avatar alexpott

Issue #2628754 by cilefen, kristiaanvandeneynde, dawehner, Berdir:...

Issue #2628754 by cilefen, kristiaanvandeneynde, dawehner, Berdir: Link::toString() should not be deprecated
parent 9f4034ac
......@@ -140,11 +140,15 @@ public function setUrl(Url $url) {
/**
* Generates the HTML for this Link object.
*
* Do not use this method to render a link in an HTML context. In an HTML
* context, self::toRenderable() should be used so that render cache
* information is maintained. However, there might be use cases such as tests
* and non-HTML contexts where calling this method directly makes sense.
*
* @return \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.
* @see \Drupal\Core\Link::toRenderable()
*/
public function toString() {
return $this->getLinkGenerator()->generateFromLink($this);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment