Unverified Commit 0dbceaa4 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()

(cherry picked from commit 1546b4b8)
parent 9c815fd3
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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();
  }

+2 −2
Original line number Diff line number Diff line
@@ -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 = []);

+1 −1
Original line number Diff line number Diff line
@@ -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() {