Unverified Commit e035a448 authored by git's avatar git Committed by timKruijsen

Issue #2959845 by daniel.delaiglesia: Support for icons in menu items

parent 6b1bc72e
......@@ -72,7 +72,7 @@ class MenuLinksController extends ControllerBase {
'weight' => $menuLink->weight->getValue()[0]['value'],
'langcode' => $menuLink->langcode->getValue()[0]['value'],
'uuid' => $menuLink->uuid(),
'attributes' => !empty($menuLink->link->getValue()[0]['options']['attributes']) ? $menuLink->link->getValue()[0]['options']['attributes'] : NULL,
'options' => !empty($menuLink->link->getValue()[0]['options']) ? $menuLink->link->getValue()[0]['options'] : NULL,
];
if (array_key_exists('drush', $form) && $form['drush'] === TRUE) {
......@@ -300,7 +300,7 @@ class MenuLinksController extends ControllerBase {
'link' => [
'uri' => $menuLink['uri'],
'title' => $menuLink['link_title'],
'options' => !empty($menuLink['attributes']) ? ['attributes' => $menuLink['attributes']] : NULL,
'options' => !empty($menuLink['options']) ? $menuLink['options'] : NULL,
],
'menu_name' => $menuLink['menu_name'],
'expanded' => $menuLink['expanded'] === '1' ? TRUE : FALSE,
......@@ -322,7 +322,7 @@ class MenuLinksController extends ControllerBase {
->set('link', [
'uri' => $menuLink['uri'],
'title' => $menuLink['link_title'],
'options' => !empty($menuLink['attributes']) ? ['attributes' => $menuLink['attributes']] : NULL,
'options' => !empty($menuLink['options']) ? $menuLink['options'] : NULL,
])
->set('expanded', $menuLink['expanded'] === '1' ? TRUE : FALSE)
->set('enabled', $menuLink['enabled'] === '1' ? TRUE : FALSE)
......@@ -388,7 +388,7 @@ class MenuLinksController extends ControllerBase {
'link' => [
'uri' => $menuLink['uri'],
'title' => $menuLink['link_title'],
'options' => !empty($menuLink['attributes']) ? ['attributes' => $menuLink['attributes']] : NULL,
'options' => !empty($menuLink['options']) ? $menuLink['options'] : NULL,
],
'menu_name' => $menuLink['menu_name'],
'expanded' => $menuLink['expanded'] === '1' ? TRUE : FALSE,
......@@ -434,7 +434,7 @@ class MenuLinksController extends ControllerBase {
'link' => [
'uri' => $menuLink['uri'],
'title' => $menuLink['link_title'],
'options' => !empty($menuLink['attributes']) ? ['attributes' => $menuLink['attributes']] : NULL,
'options' => !empty($menuLink['options']) ? $menuLink['options'] : NULL,
],
'menu_name' => $menuLink['menu_name'],
'expanded' => $menuLink['expanded'] === '1' ? TRUE : FALSE,
......
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