Commit 8b3a86f9 authored by Aleksey.Alekseev's avatar Aleksey.Alekseev
Browse files

Links & Menu description

parent e7ed69e7
......@@ -178,15 +178,15 @@ class DrushContentImport extends DrushCommands {
// TODO: Create menu
if ($menu = \Drupal::entityTypeManager()->getStorage('menu')->load($data['menu']['id'])) {
$menu->set('label', 'Test menu');
$menu->set('description', 'Description text');
$menu->set('label', $data['menu']['label']);
$menu->set('description', $data['menu']['description']);
$menu->save();
}
else {
\Drupal::entityTypeManager()->getStorage('menu')->create([
'id' => $data['menu']['id'],
'label' => 'Test menu',
'description' => 'Description text',
'label' => $data['menu']['label'],
'description' => $data['menu']['description'],
])->save();
}
......@@ -209,6 +209,7 @@ class DrushContentImport extends DrushCommands {
'expanded' => $menu_link['expanded'],
'weight' => $menu_link['weight'],
'parent' => $parent_id,
'description' => $menu_link['description'],
];
$children = $menu_link['children'];
$menu_link = $link->create($t);
......
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