diff --git a/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php b/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php index 56603c7f3ca..68be0029368 100644 --- a/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php +++ b/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php @@ -392,13 +392,6 @@ abstract class ConfigEntityBase extends Entity implements ConfigEntityInterface return parent::urlInfo($rel, $options); } - /** - * {@inheritdoc} - */ - public function getSystemPath($rel = 'edit-form') { - return parent::getSystemPath($rel); - } - /** * {@inheritdoc} */ diff --git a/core/lib/Drupal/Core/Entity/Entity.php b/core/lib/Drupal/Core/Entity/Entity.php index 9341b211d65..9ffa4975438 100644 --- a/core/lib/Drupal/Core/Entity/Entity.php +++ b/core/lib/Drupal/Core/Entity/Entity.php @@ -216,16 +216,6 @@ abstract class Entity implements EntityInterface { return $uri->setOptions($uri_options); } - /** - * {@inheritdoc} - */ - public function getSystemPath($rel = 'canonical') { - if ($this->hasLinkTemplate($rel) && $uri = $this->urlInfo($rel)) { - return $uri->getInternalPath(); - } - return ''; - } - /** * {@inheritdoc} */ diff --git a/core/lib/Drupal/Core/Entity/EntityInterface.php b/core/lib/Drupal/Core/Entity/EntityInterface.php index 284b39622bc..68dafd02aa0 100644 --- a/core/lib/Drupal/Core/Entity/EntityInterface.php +++ b/core/lib/Drupal/Core/Entity/EntityInterface.php @@ -161,23 +161,6 @@ interface EntityInterface extends AccessibleInterface, CacheableDependencyInterf */ public function link($text = NULL, $rel = 'canonical', array $options = []); - /** - * Gets the internal path for this entity. - * - * self::url() will return the full path including any prefixes, fragments, or - * query strings. This path does not include those. - * - * @param string $rel - * The link relationship type, for example: canonical or edit-form. - * - * @return string - * The internal path for this entity. - * - * @deprecated in Drupal 8.x-dev, will be removed before Drupal 8.0.0. Use - * static::urlInfo() instead. - */ - public function getSystemPath($rel = 'canonical'); - /** * Indicates if a link template exists for a given key. * diff --git a/core/modules/comment/src/Tests/CommentTranslationUITest.php b/core/modules/comment/src/Tests/CommentTranslationUITest.php index fdd69dbbd69..3d070248f06 100644 --- a/core/modules/comment/src/Tests/CommentTranslationUITest.php +++ b/core/modules/comment/src/Tests/CommentTranslationUITest.php @@ -138,12 +138,12 @@ class CommentTranslationUITest extends ContentTranslationUITestBase { */ protected function doTestAuthoringInfo() { $entity = entity_load($this->entityTypeId, $this->entityId, TRUE); - $path = $entity->getSystemPath('edit-form'); $languages = $this->container->get('language_manager')->getLanguages(); $values = array(); // Post different authoring information for each translation. foreach ($this->langcodes as $langcode) { + $url = $entity->urlInfo('edit-form', ['language' => $languages[$langcode]]); $user = $this->drupalCreateUser(); $values[$langcode] = array( 'uid' => $user->id(), @@ -154,7 +154,7 @@ class CommentTranslationUITest extends ContentTranslationUITestBase { 'date[date]' => format_date($values[$langcode]['created'], 'custom', 'Y-m-d'), 'date[time]' => format_date($values[$langcode]['created'], 'custom', 'H:i:s'), ); - $this->drupalPostForm($path, $edit, $this->getFormSubmitAction($entity, $langcode), array('language' => $languages[$langcode])); + $this->drupalPostForm($url, $edit, $this->getFormSubmitAction($entity, $langcode)); } $entity = entity_load($this->entityTypeId, $this->entityId, TRUE); diff --git a/core/modules/views_ui/src/ViewUI.php b/core/modules/views_ui/src/ViewUI.php index 75bbbdfb015..65326894bfe 100644 --- a/core/modules/views_ui/src/ViewUI.php +++ b/core/modules/views_ui/src/ViewUI.php @@ -996,13 +996,6 @@ class ViewUI implements ViewEntityInterface { return $this->storage->link($text, $rel, $options); } - /** - * {@inheritdoc} - */ - public function getSystemPath($rel = 'edit-form') { - return $this->storage->getSystemPath($rel); - } - /** * Implements \Drupal\Core\Entity\EntityInterface::label(). */ diff --git a/core/tests/Drupal/Tests/Core/Entity/EntityUrlTest.php b/core/tests/Drupal/Tests/Core/Entity/EntityUrlTest.php index 9cab4fa6f2b..8b9852c545c 100644 --- a/core/tests/Drupal/Tests/Core/Entity/EntityUrlTest.php +++ b/core/tests/Drupal/Tests/Core/Entity/EntityUrlTest.php @@ -239,38 +239,6 @@ class EntityUrlTest extends UnitTestCase { $this->assertSame('http://drupal/entity/test_entity_type/test_entity_id', $valid_entity->url('canonical', array('absolute' => TRUE))); } - /** - * Tests the getPathByAlias() method. - * - * @covers ::getSystemPath - */ - public function testGetSystemPath() { - $entity_type = $this->getMock('Drupal\Core\Entity\EntityTypeInterface'); - $entity_type->expects($this->any()) - ->method('getLinkTemplates') - ->will($this->returnValue(array( - 'canonical' => 'entity.test_entity_type.canonical', - ))); - - $this->entityManager - ->expects($this->any()) - ->method('getDefinition') - ->with('test_entity_type') - ->will($this->returnValue($entity_type)); - - $no_link_entity = $this->getMockForAbstractClass('Drupal\Core\Entity\Entity', array(array('id' => 'test_entity_id'), 'test_entity_type')); - $this->assertSame('', $no_link_entity->getSystemPath('banana')); - - $this->urlGenerator->expects($this->once()) - ->method('getPathFromRoute') - ->with('entity.test_entity_type.canonical', array('test_entity_type' => 'test_entity_id')) - ->will($this->returnValue('entity/test_entity_type/test_entity_id')); - - $valid_entity = $this->getMockForAbstractClass('Drupal\Core\Entity\Entity', array(array('id' => 'test_entity_id'), 'test_entity_type')); - - $this->assertSame('entity/test_entity_type/test_entity_id', $valid_entity->getSystemPath()); - } - /** * Tests the retrieval of link templates. *