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
No related merge requests found
......@@ -17,7 +17,7 @@ class EntityHierarchyHandler implements EntityHierarchyHandlerInterface {
public function getAddChildUrl(EntityTypeInterface $entityType, ContentEntityInterface $parent, $bundle, $fieldName) {
$routeName = "entity.{$entityType->id()}.add_form";
return Url::fromRoute($routeName, [
$entityType->getKey('bundle') => $bundle,
($entityType->getBundleEntityType() ?? $entityType->getKey('bundle')) => $bundle,
], [
'query' => [
$fieldName => $parent->id(),
......
......@@ -128,7 +128,7 @@ class ReorderChildrenFunctionalTest extends BrowserTestBase {
$assert->linkExists('Children');
$different_test_entity = EntityTestRev::create([
'type' => 'entity_test_rev',
'label' => 'No children here',
'name' => 'No children here',
]);
$different_test_entity->save();
$this->drupalGet($different_test_entity->toUrl());
......@@ -140,7 +140,7 @@ class ReorderChildrenFunctionalTest extends BrowserTestBase {
entity_test_create_bundle('someotherbundle');
$another_different_test_entity = EntityTest::create([
'type' => 'someotherbundle',
'label' => 'No children here either',
'name' => 'No children here either',
]);
$another_different_test_entity->save();
$this->drupalGet($another_different_test_entity->toUrl());
......@@ -156,7 +156,7 @@ class ReorderChildrenFunctionalTest extends BrowserTestBase {
$field->save();
$another_different_test_entity = EntityTest::create([
'type' => 'someotherbundle',
'label' => 'No children here either',
'name' => 'No children here either',
]);
$another_different_test_entity->save();
$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