Commit 7ed6ebe8 authored by alexpott's avatar alexpott

Issue #2350915 by pwolanin: Don't require bundle option to be passed in when...

Issue #2350915 by pwolanin: Don't require bundle option to be passed in when creating a MenuLinkContent entity.
parent 539ff305
......@@ -219,6 +219,13 @@ protected function getPluginDefinition() {
return $definition;
}
/**
* {@inheritdoc}
*/
public static function preCreate(EntityStorageInterface $storage, array &$values) {
$values += ['bundle' => 'menu_link_content'];
}
/**
* {@inheritdoc}
*/
......
......@@ -64,7 +64,6 @@ function createLinkHierarchy($module = 'menu_test') {
'title' => 'Menu link test',
'provider' => $module,
'menu_name' => 'menu_test',
'bundle' => 'menu_link_content'
);
$parent = $base_options + array(
......
......@@ -182,7 +182,6 @@ function menu_ui_node_save(EntityInterface $node) {
'parent' => $definition['parent'],
'weight' => isset($definition['weight']) ? $definition['weight'] : 0,
'enabled' => 1,
'bundle' => 'menu_link_content',
'langcode' => $node->getUntranslated()->language()->id,
));
}
......
......@@ -134,7 +134,6 @@ function testMenuNodeFormWidget() {
'route_parameters' => array('node' => $node->id()),
'title' => $this->randomMachineName(16),
'menu_name' => 'admin',
'bundle' => 'menu_link_content',
));
$item->save();
......@@ -159,7 +158,6 @@ function testMenuNodeFormWidget() {
'title' => $this->randomMachineName(16),
'parent' => $item->getPluginId(),
'menu_name' => $item->getMenuName(),
'bundle' => 'menu_link_content',
));
$child_item->save();
// Edit the first node.
......
Markdown is supported
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