Build the menu structure.

@return mixed
1854
public function getItemProviders()
    {
        foreach ($this->modules->enabled() as $module) {
            $name = studly_case($module->getName());
            $class = 'Modules\\'.$name.'\\MenuExtenders\\MenuExtender';

            if (class_exists($class)) {
                $extender = $this->container->make($class);
                $this->extenders->put($module->getName(), [
                    'content' => $extender->getContentItems(),
                    'static'  => $extender->getStaticItems(),
                ]);
            }
        }

        return $this->extenders;
    }
693080
public function getMenu()
    {
        return (new AdminMenuBuilder($this))
            ->nodeRoute('menu_node_filemanager', 'cloud_upload', 'admin/storage/index')
            ->node('menu_node_system', 'settings_applications')
                ->group('menu_group_access')
                    ->itemApi('menu_access_item_user', 'admin/user/index', 'person', 'api-admin-user')
                    ->itemApi('menu_access_item_apiuser', 'admin/api-user/index', 'device_hub', 'api-admin-apiuser')
                    ->itemApi('menu_access_item_group', 'admin/group/index', 'group', 'api-admin-group')
                ->group('menu_group_system')
                    ->itemApi('menu_system_item_config', 'admin/config/index', 'storage', 'api-admin-config')
                    ->itemApi('menu_system_item_language', 'admin/lang/index', 'language', 'api-admin-lang')
                    ->itemApi('menu_system_item_tags', 'admin/tag/index', 'view_list', 'api-admin-tag')
                    ->itemApi('menu_system_logger', 'admin/logger/index', 'notifications', 'api-admin-logger')
                    ->itemApi('Queue', 'admin/queue-log/index', 'schedule', 'api-admin-queuelog')
                ->group('menu_group_images')
                    ->itemApi('menu_images_item_effects', 'admin/effect/index', 'blur_circular', 'api-admin-effect')
                    ->itemApi('menu_images_item_filters', 'admin/filter/index', 'adjust', 'api-admin-filter')
                ->group('menu_group_contentproxy')
                    ->itemApi('menu_group_contentproxy_machines', 'admin/proxy-machine/index', 'devices', 'api-admin-proxymachine')
                    ->itemApi('menu_group_contentproxy_builds', 'admin/proxy-build/index', 'import_export', 'api-admin-proxybuild');
    }
176577
protected function buildButtons()
    {
        if (!isset($this->buttonsParts['{intervalSelect}'])) {
            $this->buttonsParts['{intervalSelect}'] = $this->buildIntervalSelect();
        }

        if (!isset($this->buttonsParts['{aggregationSelect}'])) {
            $this->buttonsParts['{aggregationSelect}'] = $this->buildAggregationSelect();
        }

        return strtr($this->buttonsTemplate, $this->buttonsParts);
    }
676729
public function addMenu()
    {
        $menuLocations = $this->wpProvider
            ->getNavMenuLocations();

        $data = [];

        foreach ($menuLocations as $menuLocation => $menuId) {
            $menu = $this->wpProvider
                ->wpGetNavMenuItems($menuId);

            foreach ($menu as $menuItem) {
                $item = new stdClass();

                /**
                 * @var WpPost $menuItem
                 */
                $item->item = $menuItem->title;
                $item->link = $menuItem->url;
                $item->active = (Path::getCurrentUrl() === $menuItem->url) ? true : false;

                $data[$menuLocation][] = $item;
            }
        }

        $this->mergeToTheData($data);
        return $this;
    }
1264249
private function build() {

        //Get value
        $selected = null;

        if(true === $this -> filled) {

            if(true === isset($this -> attributes['name'])) {

                if(true === Request :: isPost()) {
                    $selected = Request :: fromPost($this -> attributes['name']);
                }
            }
        }

        //Build select
        $html = '<select';
        
        foreach($this -> attributes as $attribute => $value) {

            if('value' !== $attribute) {
                $html .= ' ' . $attribute . '="'. Escape :: attr($value) .'"';
            }
        }

        $html .= '>';

        $number = new Number();

        //Build options
        $maxsteps = (max($this -> min, $this -> max) - min($this -> min, $this -> max)) / $this -> steps;

        for($i = 0; $i <= $maxsteps; $i++) {

            //-1 to -2 && 1 to -1
            if($this -> max < 0 && $this -> min > $this -> max) {
                $key = $this -> min - $this -> steps * $i;
            }
            //-1 to 1 && -2 to -1
            elseif($this -> min < 0) {
                $key = $this -> min + $this -> steps * $i;
            }
            //0 to 1
            elseif($this -> min <= $this -> max) {
                $key = $this -> steps * $i;
            }
            //1 to 0
            else {
                $key = $this -> min - $this -> steps * $i;
            }

            $number -> set($key) -> toFixed($this -> round);

            $html .= '<option value="'. Escape :: attr($key) .'"';

            if((string) $key == $selected) {
                $html .= ' selected="selected"';
            }

            $html .= '>'. Escape :: html($number -> get()) .'</option>';              
        }
        
        $html .= '</select>';

        return $html;
    }
1233301
public function getMenu()
    {
        return $this->auth(function () {
            return $this->http->getJson($this->baseUrl . 'cgi-bin/menu/get?access_token=' . $this->accessToken);
        });
    }
1314929
public function build()
    {
        if (isset($this->component)) {
            return $this->component;
        }

        $this->component = BuildUtil::removeNullElements([
            'type' => ComponentType::SEPARATOR,
            'margin' => $this->margin,
            'color' => $this->color,
        ]);

        return $this->component;
    }
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),
        ]);
    }
1314790
public function getMenu()
    {
        // Retrieve the item from cache since we're going to have to build this out manually
        $items = array();
        $fullRoutes = explode('|', $this->menu);
        foreach ($fullRoutes as $route)
        {
            if ($route == "")
                continue;
            $items[] = array('label' => ucwords(str_replace('-', ' ', $route)), 'url' => Yii::app()->createUrl('/' . $route), 'active' => false);
        }

        return $items;
    }
145132
protected function createMenu()
    {
        $menuFactory = $this->container->get('vince_t.admin.menu.factory');

        $menu = $menuFactory->createItem('root');
        $menu->setChildrenAttribute('class', 'nav nav-list');
        $menu->setCurrentUri($this->getRequest()->getBaseUrl().$this->getRequest()->getPathInfo());

        $configSectionManager = $this->container->get('admin.configuration.configsection_manager');
        $sections = $configSectionManager->getRepository()->findAllWithConfigGroups();
        $i = 0;
        foreach ($sections as $section) {
            if ($i > 0) {
                $menu->addDivider();
            }
            $sLabel = $section->getSLabel();
            $menu->addNavHeader($sLabel);
            $groups = $this->container->get('admin.configuration.configgroup_manager')->getRepository()->findByConfigGroupId($section->getId());
            foreach ($groups as $group) {
                $gLabel = '    '.$group->getGLabel();
                $menu->addChild(
                    $gLabel,
                    array(
                        'route' => 'vince_t_admin_configuration_group',
                        'routeParameters' => array(
                            'sname' => $section->getName(),
                            //'id' => $group->getId(),
                            'gname' => $group->getName(),
                        ),
                    )
                );
            }
            $i++;
        }

        return $menu;
    }
626697
public function subMenu()
    {
        $nb = $this->spawn('subMenu', new Collection());

        $subs = $this->active()->children();
        foreach ($subs as $s) {
            $nb->add($s->title, $s->url());
        }

        return $nb;
    }
142125
public function build()
    {
        // Has this button an icon to add?
        if (isset($this->icon)) {
            $this->inner = $this->icon->build() . ' ' . $this->inner;
        }

        // Add button type css
        $this->css[] = 'btn-' . $this->option;

        // Do we have to add cs for a specific button size?
        if (isset($this->size)) {
            $this->css[] = 'btn-' . $this->size;
        }

        return parent::build();
    }
825148
protected function build()
    {
        $page = Typo3GeneralUtility::_GP('page');

        /** @var \Metaseo\Metaseo\Sitemap\Generator\XmlGenerator $generator */
        $generator = $this->objectManager->get('Metaseo\\Metaseo\\Sitemap\\Generator\\XmlGenerator');

        if (empty($page) || $page === 'index') {
            return $generator->sitemapIndex();
        } else {
            return $generator->sitemap($page);
        }
    }
265407
public function getMenu()
    {
        if ( null === $this->_menu &&
             ! empty( $this->menuId ) )
        {
            $this->_menu = $this->getMenuModel()
                                ->find( $this->menuId );
        }

        return $this->_menu;
    }
1351750
public function createResourceMenuConfiguration()
    {
        $menuConfiguration = [];

        foreach ($this->resourceCollection->all() as $resource) {
            $resourceConfiguration = $resource->getConfiguration();

            // Add only entry for the "list" action
            if (
                !key_exists('actions', $resourceConfiguration) ||
                null === $resourceConfiguration['actions'] ||
                !array_key_exists('list', $resourceConfiguration['actions'])
            ) {
                continue;
            }
            $menuConfiguration['items'][] = [
                'text' => ucfirst($resource->getName()),
                'admin' => $resource->getName(),
                'action' => 'list',
            ];
        }

        return $menuConfiguration;
    }
211164
public function getMenus()
    {
        $this->menus || $this->menus = wei()->menu()->notDeleted()->findAll(['categoryId' => $this['id']]);

        return $this->menus;
    }
953763
public function build()
    {
        $params = [
            'alert' => $this->alert,
            'title' => $this->title,
            'message_variation_id' => $this->messageVariationId,
            'priority' => $this->priority,
            'collapse_key' => $this->collapseKey,
            'sound' => $this->sound,
            'custom_uri' => $this->uri,
            'summary_text' => $this->summaryText,
            'time_to_live' => $this->timeToLive,
            'notification_id' => $this->notificationId,
            'push_icon_image_url' => $this->pushIconImageUrl,
            'accent_color' => $this->accentColour,
        ];

        if (!empty($this->extra)) {
            $params['extra'] = $this->extra;
        }

        return array_filter($params, function ($param) {
            return $param !== null;
        });
    }