diff --git a/core/modules/content_translation/src/Plugin/Derivative/ContentTranslationContextualLinks.php b/core/modules/content_translation/src/Plugin/Derivative/ContentTranslationContextualLinks.php index 9afcd5f..c484f3c 100644 --- a/core/modules/content_translation/src/Plugin/Derivative/ContentTranslationContextualLinks.php +++ b/core/modules/content_translation/src/Plugin/Derivative/ContentTranslationContextualLinks.php @@ -53,15 +53,10 @@ public function getDerivativeDefinitions($base_plugin_definition) { // Create contextual links for translatable entity types. foreach ($this->contentTranslationManager->getSupportedEntityTypes() as $entity_type_id => $entity_type) { $this->derivatives[$entity_type_id]['title'] = t('Translate'); - // @TODO What to do with this once link templates are paths again? - if (($link_template = $entity_type->getLinkTemplate('drupal:content-translation-overview')) && strpos($link_template, '/') !== FALSE) { - $this->derivatives[$entity_type_id]['route_name'] = "entity.$entity_type_id.content_translation_overview"; - } - else { - $this->derivatives[$entity_type_id]['route_name'] = $entity_type->getLinkTemplate('drupal:content-translation-overview'); - } + $this->derivatives[$entity_type_id]['route_name'] = "entity.$entity_type_id.content_translation_overview"; $this->derivatives[$entity_type_id]['group'] = $entity_type_id; } + debug($this->derivatives); return parent::getDerivativeDefinitions($base_plugin_definition); } diff --git a/core/modules/content_translation/src/Tests/ContentTranslationContextualLinksTest.php b/core/modules/content_translation/src/Tests/ContentTranslationContextualLinksTest.php index 9033d83..1c11fb2 100644 --- a/core/modules/content_translation/src/Tests/ContentTranslationContextualLinksTest.php +++ b/core/modules/content_translation/src/Tests/ContentTranslationContextualLinksTest.php @@ -131,6 +131,7 @@ public function testContentTranslationContextualLinks() { $response = $this->renderContextualLinks(array('node:node=1:'), 'node/' . $node->id()); $this->assertResponse(200); $json = Json::decode($response); + debug($json); $this->drupalSetContent($json['node:node=1:']); $this->assertLinkByHref($translate_link, 0, 'The contextual link to translate the node is shown.'); diff --git a/core/modules/field_ui/src/DisplayOverview.php b/core/modules/field_ui/src/DisplayOverview.php index 2bc07c1..7552154 100644 --- a/core/modules/field_ui/src/DisplayOverview.php +++ b/core/modules/field_ui/src/DisplayOverview.php @@ -207,7 +207,7 @@ protected function getTableHeader() { */ protected function getOverviewRoute($mode) { return array( - 'route_name' => 'field_ui.display_overview_view_mode_' . $this->entity_type, + 'route_name' => 'field_ui.display_overview_view_mode_' . $this->bundleEntityType, 'route_parameters' => array( $this->bundleEntityType => $this->bundle, 'view_mode_name' => $mode, diff --git a/core/modules/field_ui/src/FormDisplayOverview.php b/core/modules/field_ui/src/FormDisplayOverview.php index aacd423..d383b06 100644 --- a/core/modules/field_ui/src/FormDisplayOverview.php +++ b/core/modules/field_ui/src/FormDisplayOverview.php @@ -172,7 +172,7 @@ protected function getTableHeader() { */ protected function getOverviewRoute($mode) { return array( - 'route_name' => 'field_ui.form_display_overview_form_mode_' . $this->entity_type, + 'route_name' => 'field_ui.form_display_overview_form_mode_' . $this->bundleEntityType, 'route_parameters' => array( $this->bundleEntityType => $this->bundle, 'form_mode_name' => $mode, diff --git a/core/modules/menu_link_content/menu_link_content.routing.yml b/core/modules/menu_link_content/menu_link_content.routing.yml index ac642bd..20832e9 100644 --- a/core/modules/menu_link_content/menu_link_content.routing.yml +++ b/core/modules/menu_link_content/menu_link_content.routing.yml @@ -1,4 +1,4 @@ -entity.menu.add_form: +entity.menu.add_link_form: path: '/admin/structure/menu/manage/{menu}/add' defaults: _content: '\Drupal\menu_link_content\Controller\MenuController::addLink' diff --git a/core/modules/menu_ui/menu_ui.module b/core/modules/menu_ui/menu_ui.module index 9f6e9f8..69c23e3 100644 --- a/core/modules/menu_ui/menu_ui.module +++ b/core/modules/menu_ui/menu_ui.module @@ -77,7 +77,7 @@ function menu_ui_entity_type_build(array &$entity_types) { ->setLinkTemplate('add-form', 'entity.menu.add_form') ->setLinkTemplate('delete-form', 'entity.menu.delete_form') ->setLinkTemplate('edit-form', 'entity.menu.edit_form') - ->setLinkTemplate('add-link-form', 'entity.menu.add_form'); + ->setLinkTemplate('add-link-form', 'entity.menu.add_link_form'); } diff --git a/core/modules/menu_ui/src/MenuForm.php b/core/modules/menu_ui/src/MenuForm.php index ab86985..fde70bb 100644 --- a/core/modules/menu_ui/src/MenuForm.php +++ b/core/modules/menu_ui/src/MenuForm.php @@ -240,7 +240,7 @@ protected function buildOverviewForm(array &$form, FormStateInterface $form_stat $form = array_merge($form, $this->buildOverviewTreeForm($tree, $delta)); $destination = $this->getUrlGenerator()->getPathFromRoute('entity.menu.edit_form', array('menu' => $this->entity->id())); - $url = $destination = $this->url('entity.add_form', array('menu' => $this->entity->id()), array('query' => array('destination' => $destination))); + $url = $destination = $this->url('entity.menu.add_link_form', array('menu' => $this->entity->id()), array('query' => array('destination' => $destination))); $form['#empty_text'] = $this->t('There are no menu links yet. Add link.', array('@url' => $url)); return $form;