create bottom left menu defined in the contructor.

@return \Knp\Menu\ItemInterface
172333
public function initBottomLeftNavbar()
    {
        $this->bottomLeftNavbar = $this->factory->createItem('root', [
                'childrenAttributes' => [
                    'id' => 'v-footer-navbar-bottom-left',
                ],
            ]
        );

        $this->createDropdownMenuItem(
            $this->getBottomLeftNavbar(),
            'menu.additionals',
            [
                'dropdown'           => true,
                'childrenAttributes' => [
                    'class' => 'v-drop v-drop__menu',
                    'id'    => 'footer-drop-navbar-left',
                ],
                'attributes' => [
                    'class'       => 'vic-dropdown',
                    'data-toggle' => 'vic-dropdown',
                ],
                'linkAttributes' => [
                    'id'              => 'v-additionals-drop',
                    'class'           => 'v-btn v-btn--transparent v-drop-trigger--no-toggle',
                    'data-flag'       => 'v-drop',
                    'data-position'   => 'topout leftin',
                    'data-droptarget' => '#footer-drop-navbar-left',
                ],
                'uri' => '#',
            ],
            false
        );

        return $this->bottomLeftNavbar;
    }
191787
private function generateLeftMenu()
    {
        $leftMenu = \Menu::getMenu('leftMenu');

        $leftMenu->link('docs', function (Link $link) {
            $link->name = 'Documentation';
            $link->url  = route('larecipe.index');
        });
    }
303253
public function getMainItem()
    {
        $menuPage = $this->menuBuilder->getTopNavbar()->getChild('menu.page');

        if ($menuPage) {
            return $menuPage;
        } else {
            return $this->menuBuilder->createDropdownMenuItem(
                $this->menuBuilder->getTopNavbar(),
                'menu.page'
            );
        }
    }
1334671
public function createAdminMenu(array $options): ItemInterface
    {
        $menu = $this->factory->createItem('root');

        $event = new AdminMenuCollectionEvent($menu);
        $this->dispatcher->dispatch(AdminMenuCollectionEvent::NAME, $event);

        return $menu;
    }
1256358
private function createLeftMenu(): string
    {
        $argsCount = 0;
        $arrayKey = $this->getArrayKey($this->menuData);
        $output = '<ul class="navbar navbar-nav mr-auto">';
        foreach ($arrayKey as $menuItem) {
            list($url, $text, $place, $id, $class) = $this->getLinkInformation([$menuItem]);
            if ($place == 'left') {
                $arguments[$argsCount] = $menuItem;
                $arraySubKey = $this->getArrayKey($this->menuData[$menuItem]);
                if (count($arraySubKey) === 0) {
                    $output .= '<li class="nav-item">';
                    $output .= $this->createNavLinkUrl($arguments);
                    $output .= '</li>';
                } else {
                    $output .= '<li class="nav-item dropdown">';
                    $output .= $this->createSubmenu($arguments, $this->menuData[$menuItem]);
                    $output .= '</li>';
                }
            }
        }
        $output .= '</ul>';
        return $output;
    }
854333
public function form()
    {
        return Menu::form(function (Form $form) {
            $form->display('id', 'ID');

            $form->select('parent_id', trans('merchant.parent_id'))->options(Menu::selectOptions());
            $form->text('title', trans('merchant.title'))->rules('required');
            $form->icon('icon', trans('merchant.icon'))->default('fa-bars')->rules('required')->help($this->iconHelp());
            $form->text('uri', trans('merchant.uri'));
            $form->multipleSelect('roles', trans('merchant.roles'))->options(Role::all()->pluck('name', 'id'));

            $form->display('created_at', trans('merchant.created_at'));
            $form->display('updated_at', trans('merchant.updated_at'));
        });
    }
177964
public function newAction()
    {
        $entity = new Menu();
        $form   = $this->createForm('menu', $entity);

        return array(
            'entity' => $entity,
            'form'   => $form->createView(),
        );
    }
958638
public function getUserMenu() {
    $event = new BuildUserMenuEvent();
    $this->trigger(self::EVENT_BUILD_USER_MENU, $event);
    $menu = [];
    foreach ($event->items as $block => $items) {
      foreach ($items as $item) {
        $menu[] = $item;
      }
    }
    return $menu;
  }
788631
public function form()
    {
        $menuModel = config('admin.database.menu_model');
        $permissionModel = config('admin.database.permissions_model');
        $roleModel = config('admin.database.roles_model');

        $form = new Form(new $menuModel());

        $form->display('id', 'ID');

        $form->select('parent_id', trans('admin.parent_id'))->options($menuModel::selectOptions());
        $form->text('title', trans('admin.title'))->rules('required');
        $form->icon('icon', trans('admin.icon'))->default('fa-bars')->rules('required')->help($this->iconHelp());
        $form->text('uri', trans('admin.uri'));
        $form->multipleSelect('roles', trans('admin.roles'))->options($roleModel::all()->pluck('name', 'id'));
        if ($form->model()->withPermission()) {
            $form->select('permission', trans('admin.permission'))->options($permissionModel::pluck('name', 'slug'));
        }

        $form->display('created_at', trans('admin.created_at'));
        $form->display('updated_at', trans('admin.updated_at'));

        return $form;
    }
334136
public function addMenuRight()
    {
        $menu = $this->add([new self(), 'ui' => false], 'RightMenu');
        $menu->removeClass('item')->addClass('right menu');

        return $menu;
    }
466561
public function toTopLevelElement()
    {
        $request     = $this->_getOriginalRequest();
        $activeItems = $this->_findPath($request);
        $this->setBranchVisible($activeItems);
        foreach ($activeItems as $activeItem) {
            if ($activeItem instanceof \Gems_Menu_SubMenuItem) {
                $activeItem->set('class', 'active');
            }
        }

        $parameterSources[] = $request;

        if ($this->_menuParameters) {
            $parameterSources[] = $this->_menuParameters;
        }

        $source = new \Gems_Menu_ParameterCollector($parameterSources);

        $nav = $this->_toNavigationArray($source);

        // \MUtil_Echo::track($nav);

        $ul = $this->renderFirst();

        $this->renderItems($ul, $nav, false);

        return $ul;
    }
1351435
public function build(array $options): ItemInterface
    {
        $menu = $this->createStructure($options);

        $this->dispatchMenuEvent($this->getConfigureEventName(), $this->createConfigureMenuEvent($menu, $options));

        return $menu;
    }
697394
public function create()
    {
        // Keep default options in an array and merge with incoming options that can override the defaults.
        $default = array(
            'id'          => null,
            'class'       => null,
            'wrapper'     => 'nav',
            'create_url'  => function ($url) {
                return $url;
            },
        );
        $menu = array_replace_recursive($default, $this->config);

        // Create the ul li menu from the array, use an anonomous recursive function that returns an
        // array of values.
        $createMenu = function ($items, $callback) use (&$createMenu, $menu) {
            
            $html = null;
            $hasItemIsSelected = false;

            foreach ($items as $item) {

                // has submenu, call recursivly and keep track on if the submenu has a selected item in it.
                $submenu        = null;
                $selectedParent = null;
            
                if (isset($item['submenu'])) {
                    list($submenu, $selectedParent) = $createMenu($item['submenu']['items'], $callback);
                    $selectedParent = $selectedParent
                        ? "selected-parent "
                        : null;
                }

                // Check if the current menuitem is selected
                $selected = $callback($item['url'])
                    ? "selected "
                    : null;
                
                // Check if the menuitem is a parent of current page, /controller for /controller/action
                $isParent = null;
                if (isset($item['mark-if-parent-of']) && $item['mark-if-parent-of'] == true) {
                    $isParent = $menu['is_parent']($item['mark-if-parent-of'])
                        ? "is-parent "
                        : null;
                }
                
                // Is there a class set for this item, then use it
                $class = isset($item['class']) && ! is_null($item['class'])
                    ? $item['class']
                    : null;

                // Prepare the class-attribute, if used
                $class = ($selected || $selectedParent || $isParent || $class)
                    ? " class='{$selected}{$selectedParent}{$isParent}{$class}' "
                    : null;

                // Add the menu item
                $url = $menu['create_url']($item['url']);
                $html .= "\n<li{$class}><a href='{$url}' title='{$item['title']}'>{$item['text']}</a>{$submenu}</li>\n";
                
                // To remember there is selected children when going up the menu hierarchy
                if ($selected) {
                    $hasItemIsSelected = true;
                }
            }

            // Return the menu
            return array("\n<ul>$html</ul>\n", $hasItemIsSelected);
        };

        // Call the anonomous function to create the menu, and submenues if any.
        list($html) = $createMenu($menu['items'], $menu['callback']);


        // Set the id & class element, only if it exists in the menu-array
        $id      = isset($menu['id'])    ? " id='{$menu['id']}'"       : null;
        $class   = isset($menu['class']) ? " class='{$menu['class']}'" : null;
        $wrapper = $menu['wrapper'];

        return "\n<{$wrapper}{$id}{$class}>{$html}</{$wrapper}>\n";
    }
1361144
public function Build() {
        $left_menu_output = "<ul class=\"content_left nav-sidebar\">";
        $main_menus = $this->_LoadXml();
        $left_menu_output .= $this->ProcessMainMenus($main_menus);
        $left_menu_output .= "</ul>";
        return $left_menu_output;
    }
1060345
public function menuAction()
    {
        $workspaces = [];
        $personalWs = null;

        $user = null;
        $token = $this->tokenStorage->getToken();
        if ($token) {
            $user = $token->getUser();
        }

        if ($user instanceof User) {
            $personalWs = $user->getPersonalWorkspace();
            $workspaces = $this->workspaceManager->getRecentWorkspaceForUser($user, $this->utils->getRoles($token));
        }

        return new JsonResponse([
            'creatable' => $this->authorization->isGranted('CREATE', new Workspace()),
            'personal' => $personalWs ? $this->serializer->serialize($personalWs, [Options::SERIALIZE_MINIMAL]) : null,
            'history' => array_map(function (Workspace $workspace) {
                return $this->serializer->serialize($workspace, [Options::SERIALIZE_MINIMAL]);
            }, $workspaces),
        ]);
    }
404698
private function generateMenu()
    {
        $this->comment("Menu...");
        if (!$this->checkWilling('menu')) {
            return $this->line("\tskip");
        }

        $variables = [
            'STARTER' => $this->starter,
        ];
        $content = Utils::renderTemplate(
            config('zgldh-scaffold.templates.menu', 'zgldh.scaffold::raw.menuItem'),
            $variables);
        Utils::addAdminMenuItem($content);
        return;
    }
785053
public function endMenu() {
        $template = 'outerMenuEnd';
        $options = [];
        if ($this->_level == 2) {
            $template = 'innerMenuEnd';
            $options['dropdownMenuEnd'] = $this->formatTemplate('dropdownMenuEnd', []);
        }
        $this->_level -= 1;
        return $this->formatTemplate($template, $options);
    }