Commit 1546b4b8 authored by alexpott's avatar alexpott

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
......@@ -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() {
......
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