Skip to content
Snippets Groups Projects
Verified Commit 42c99acb authored by Lee Rowlands's avatar Lee Rowlands
Browse files

Issue #3004037 by jsacksick: ContentTranslationController::overview() should...

Issue #3004037 by jsacksick: ContentTranslationController::overview() should not construct URLs manually

(cherry picked from commit 6da082fe)
parent 0bc24475
No related branches found
No related tags found
No related merge requests found
......@@ -145,37 +145,14 @@ public function overview(RouteMatchInterface $route_match, $entity_type_id = NUL
$translations = $entity->getTranslationLanguages();
}
$add_url = new Url(
"entity.$entity_type_id.content_translation_add",
[
'source' => $original,
'target' => $language->getId(),
$entity_type_id => $entity->id(),
],
[
'language' => $language,
]
);
$edit_url = new Url(
"entity.$entity_type_id.content_translation_edit",
[
'language' => $language->getId(),
$entity_type_id => $entity->id(),
],
[
'language' => $language,
]
);
$delete_url = new Url(
"entity.$entity_type_id.content_translation_delete",
[
'language' => $language->getId(),
$entity_type_id => $entity->id(),
],
[
'language' => $language,
]
);
$options = ['language' => $language];
$add_url = $entity->toUrl('drupal:content-translation-add', $options)
->setRouteParameter('source', $original)
->setRouteParameter('target', $language->getId());
$edit_url = $entity->toUrl('drupal:content-translation-edit', $options)
->setRouteParameter('language', $language->getId());
$delete_url = $entity->toUrl('drupal:content-translation-delete', $options)
->setRouteParameter('language', $language->getId());
$operations = [
'data' => [
'#type' => 'operations',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment