Skip to content
Snippets Groups Projects
Unverified Commit 1546b4b8 authored by Alex Pott's avatar Alex Pott
Browse files

Issue #3059564 by yogeshmpawar, fredysan, init90, joachim, alexpott: error in...

Issue #3059564 by yogeshmpawar, fredysan, init90, joachim, alexpott: error in deprecation note on EntityInterface::link()
parent 8ca1b5a7
Branches
Tags
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
......@@ -268,7 +268,7 @@ protected function linkTemplates() {
* {@inheritdoc}
*/
public function link($text = NULL, $rel = 'canonical', array $options = []) {
@trigger_error("EntityInterface::link() is deprecated in Drupal 8.0.0 and will be removed in Drupal 9.0.0. EntityInterface::toLink() instead. Note, the default relationship for configuration entities changes from 'edit-form' to 'canonical'. See https://www.drupal.org/node/2614344", E_USER_DEPRECATED);
@trigger_error("EntityInterface::link() is deprecated in Drupal 8.0.0 and will be removed in Drupal 9.0.0. Use EntityInterface::toLink()->toString() instead. Note, the default relationship for configuration entities changes from 'edit-form' to 'canonical'. See https://www.drupal.org/node/2614344", E_USER_DEPRECATED);
return $this->toLink($text, $rel, $options)->toString();
}
......
......@@ -189,10 +189,10 @@ public function url($rel = 'canonical', $options = []);
* An HTML string containing a link to the entity.
*
* @deprecated in Drupal 8.0.0, intended to be removed in Drupal 9.0.0
* Please use toLink() instead.
* Use \Drupal\Core\EntityInterface::toLink()->toString() instead.
*
* @see https://www.drupal.org/node/2614344
* @see \Drupal\Core\Entity\EntityInterface::toLink
* @see \Drupal\Core\Entity\EntityInterface::toLink()
*/
public function link($text = NULL, $rel = 'canonical', array $options = []);
......
......@@ -406,7 +406,7 @@ public function testUrlInfo($rel, $options) {
* @covers ::urlInfo
*
* @group legacy
* @expectedDeprecation EntityInterface::link() is deprecated in Drupal 8.0.0 and will be removed in Drupal 9.0.0. EntityInterface::toLink() instead. Note, the default relationship for configuration entities changes from 'edit-form' to 'canonical'. See https://www.drupal.org/node/2614344
* @expectedDeprecation EntityInterface::link() is deprecated in Drupal 8.0.0 and will be removed in Drupal 9.0.0. Use EntityInterface::toLink()->toString() instead. Note, the default relationship for configuration entities changes from 'edit-form' to 'canonical'. See https://www.drupal.org/node/2614344
*/
public function testLink() {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment