Unverified Commit 4ee92a74 authored by alexpott's avatar alexpott
Browse files

Issue #2923429 by Dinesh18, voleger, alexpott: Remove 'bundle' key from menu...

Issue #2923429 by Dinesh18, voleger, alexpott: Remove 'bundle' key from menu link create method in 'Drupal\menu_link_content\Controller\MenuController'
parent cfeae61b
......@@ -20,12 +20,11 @@ class MenuController extends ControllerBase {
* Returns the menu link creation form.
*/
public function addLink(MenuInterface $menu) {
$menu_link = $this->entityManager()->getStorage('menu_link_content')->create([
'id' => '',
'parent' => '',
'menu_name' => $menu->id(),
'bundle' => 'menu_link_content',
]);
$menu_link = $this->entityTypeManager()
->getStorage('menu_link_content')
->create([
'menu_name' => $menu->id(),
]);
return $this->entityFormBuilder()->getForm($menu_link);
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment