Issue #3059564 by yogeshmpawar, fredysan, init90, joachim, alexpott: error in deprecation note on EntityInterface::link()
							parent
							
								
									8ca1b5a7c5
								
							
						
					
					
						commit
						1546b4b85a
					
				| 
						 | 
				
			
			@ -268,7 +268,7 @@ abstract class EntityBase implements EntityInterface {
 | 
			
		|||
   * {@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 @@ interface EntityInterface extends AccessibleInterface, CacheableDependencyInterf
 | 
			
		|||
   *   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 @@ class EntityUrlTest extends UnitTestCase {
 | 
			
		|||
   * @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() {
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue