Skip to content
Snippets Groups Projects
Commit 76a9cf04 authored by Sven Schüring's avatar Sven Schüring Committed by Lee Rowlands
Browse files

Issue #3349660 by sunlix: Missing MediaEntityHierarchyHandler

parent 52f85e5c
No related branches found
No related tags found
1 merge request!19Issue #3349660: Missing MediaEntityHierarchyHandler
...@@ -17,7 +17,7 @@ class EntityHierarchyHandler implements EntityHierarchyHandlerInterface { ...@@ -17,7 +17,7 @@ class EntityHierarchyHandler implements EntityHierarchyHandlerInterface {
public function getAddChildUrl(EntityTypeInterface $entityType, ContentEntityInterface $parent, $bundle, $fieldName) { public function getAddChildUrl(EntityTypeInterface $entityType, ContentEntityInterface $parent, $bundle, $fieldName) {
$routeName = "entity.{$entityType->id()}.add_form"; $routeName = "entity.{$entityType->id()}.add_form";
return Url::fromRoute($routeName, [ return Url::fromRoute($routeName, [
$entityType->getKey('bundle') => $bundle, ($entityType->getBundleEntityType() ?? $entityType->getKey('bundle')) => $bundle,
], [ ], [
'query' => [ 'query' => [
$fieldName => $parent->id(), $fieldName => $parent->id(),
......
...@@ -128,7 +128,7 @@ class ReorderChildrenFunctionalTest extends BrowserTestBase { ...@@ -128,7 +128,7 @@ class ReorderChildrenFunctionalTest extends BrowserTestBase {
$assert->linkExists('Children'); $assert->linkExists('Children');
$different_test_entity = EntityTestRev::create([ $different_test_entity = EntityTestRev::create([
'type' => 'entity_test_rev', 'type' => 'entity_test_rev',
'label' => 'No children here', 'name' => 'No children here',
]); ]);
$different_test_entity->save(); $different_test_entity->save();
$this->drupalGet($different_test_entity->toUrl()); $this->drupalGet($different_test_entity->toUrl());
...@@ -140,7 +140,7 @@ class ReorderChildrenFunctionalTest extends BrowserTestBase { ...@@ -140,7 +140,7 @@ class ReorderChildrenFunctionalTest extends BrowserTestBase {
entity_test_create_bundle('someotherbundle'); entity_test_create_bundle('someotherbundle');
$another_different_test_entity = EntityTest::create([ $another_different_test_entity = EntityTest::create([
'type' => 'someotherbundle', 'type' => 'someotherbundle',
'label' => 'No children here either', 'name' => 'No children here either',
]); ]);
$another_different_test_entity->save(); $another_different_test_entity->save();
$this->drupalGet($another_different_test_entity->toUrl()); $this->drupalGet($another_different_test_entity->toUrl());
...@@ -156,7 +156,7 @@ class ReorderChildrenFunctionalTest extends BrowserTestBase { ...@@ -156,7 +156,7 @@ class ReorderChildrenFunctionalTest extends BrowserTestBase {
$field->save(); $field->save();
$another_different_test_entity = EntityTest::create([ $another_different_test_entity = EntityTest::create([
'type' => 'someotherbundle', 'type' => 'someotherbundle',
'label' => 'No children here either', 'name' => 'No children here either',
]); ]);
$another_different_test_entity->save(); $another_different_test_entity->save();
$this->drupalGet($another_different_test_entity->toUrl()); $this->drupalGet($another_different_test_entity->toUrl());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment