summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNathaniel Catchpole2015-01-27 12:57:05 (GMT)
committerNathaniel Catchpole2015-01-27 12:57:05 (GMT)
commitf2bee5d5efe91b22fafcfd1d098b06424a1db4aa (patch)
treecfa1e9cc7b17c273188820846b39a51efc2e46f0
parent4dae1d994e9ab6ceefdc14e63040f56cabbfec37 (diff)
Issue #2414047 by dawehner, larowlan: MenuLinkContent calls getUrlInfo('content-translation-overview') when it should be 'drupal:content-translation-overview'
-rw-r--r--core/modules/menu_link_content/src/Plugin/Menu/MenuLinkContent.php2
-rw-r--r--core/modules/menu_link_content/src/Tests/MenuLinkContentUITest.php14
2 files changed, 15 insertions, 1 deletions
diff --git a/core/modules/menu_link_content/src/Plugin/Menu/MenuLinkContent.php b/core/modules/menu_link_content/src/Plugin/Menu/MenuLinkContent.php
index 34f38e2..8e3433b 100644
--- a/core/modules/menu_link_content/src/Plugin/Menu/MenuLinkContent.php
+++ b/core/modules/menu_link_content/src/Plugin/Menu/MenuLinkContent.php
@@ -194,7 +194,7 @@ class MenuLinkContent extends MenuLinkBase implements ContainerFactoryPluginInte
* {@inheritdoc}
*/
public function getTranslateRoute() {
- return $this->getEntity()->urlInfo('content-translation-overview');
+ return $this->getEntity()->urlInfo('drupal:content-translation-overview');
}
/**
diff --git a/core/modules/menu_link_content/src/Tests/MenuLinkContentUITest.php b/core/modules/menu_link_content/src/Tests/MenuLinkContentUITest.php
index a281583..811f883 100644
--- a/core/modules/menu_link_content/src/Tests/MenuLinkContentUITest.php
+++ b/core/modules/menu_link_content/src/Tests/MenuLinkContentUITest.php
@@ -8,6 +8,7 @@
namespace Drupal\menu_link_content\Tests;
use Drupal\content_translation\Tests\ContentTranslationUITest;
+use Drupal\menu_link_content\Entity\MenuLinkContent;
/**
* Tests the menu link content UI.
@@ -63,6 +64,19 @@ class MenuLinkContentUITest extends ContentTranslationUITest {
}
/**
+ * Ensure that a translate link can be found on the menu edit form.
+ */
+ public function testTranslationLinkOnMenuEditForm() {
+ $this->drupalGet('admin/structure/menu/manage/tools');
+ $this->assertNoLink(t('Translate'));
+
+ $menu_link_content = MenuLinkContent::create(['menu_name' => 'tools', 'route_name' => 'entity.menu.collection']);
+ $menu_link_content->save();
+ $this->drupalGet('admin/structure/menu/manage/tools');
+ $this->assertLink(t('Translate'));
+ }
+
+ /**
* Tests that translation page inherits admin status of edit page.
*/
function testTranslationLinkTheme() {