Renders the main menu
169245
protected function renderMenu()
    {
        if ($this->route === null && Yii::$app->controller !== null) {
            $this->route = Yii::$app->controller->getRoute();
        }
        if ($this->params === null) {
            $this->params = $_GET;
        }
        $items = $this->normalizeItems($this->items, $hasActiveChild);
        $options = $this->options;
        $tag = ArrayHelper::remove($options, 'tag', 'ul');
        return Html::tag($tag, $this->renderItems($items), $options);
    }
230436
protected function render()
	{
		if (empty($this->getContent())) {
			$parsed = parse_ini_string($this->file->getContent(), true);
			$this->setContent(is_array($parsed) ? $parsed : []);
		}
	}
442371
function Menu() {
  ui.Emitter.call(this);
  this.items = {};
  this.el = $(html).hide().appendTo('body');
  this.el.hover(this.deselect.bind(this));
  $('html').click(this.hide.bind(this));
  this.on('show', this.bindKeyboardEvents.bind(this));
  this.on('hide', this.unbindKeyboardEvents.bind(this));
}
1197624
protected function renderMenu()
    {
        $presenter = $this->getPresenter();
        $menu = $presenter->getOpenTagWrapper();

        foreach ($this->getOrderedItems() as $item) {
            if ($item->hidden()) {
                continue;
            }

            if ($item->hasSubMenu()) {
                $menu .= $presenter->getMenuWithDropDownWrapper($item);
            } elseif ($item->isHeader()) {
                $menu .= $presenter->getHeaderWrapper($item);
            } elseif ($item->isDivider()) {
                $menu .= $presenter->getDividerWrapper();
            } else {
                $menu .= $presenter->getMenuWithoutDropdownWrapper($item);
            }
        }

        $menu .= $presenter->getCloseTagWrapper();

        return $menu;
    }
320588
protected void renderOptions(FacesContext context, ResponseWriter rw, SelectOneMenu menu) throws IOException {
		Converter converter = menu.getConverter();
		List<SelectItemAndComponent> items = SelectItemUtils.collectOptions(context, menu, converter);
		
		SelectItemAndComponent selection = determineSelectedItem(context, menu, items, converter);

		for (int index = 0; index < items.size(); index++) {
			SelectItemAndComponent option = items.get(index);

			if (option.getSelectItem().isNoSelectionOption() && 
					menu.isHideNoSelectionOption() && selection != null)
				continue;
			
			renderOption(context, menu, rw, (option.getSelectItem()), index, option.getComponent(), 
					option == selection || (selection == null && option.getSelectItem().isNoSelectionOption()));
		}
	}
618306
def render(self):
        
        menu_list = []
        menu_index = 0
        for _, menu in copy.deepcopy(self.MENU).items():
            subnav = []

            menu["kwargs"]["_id"] = str(menu_index)
            menu["kwargs"]["active"] = False
            if "visible" in menu["kwargs"]:
                menu["kwargs"]["visible"] = self._test_visibility(menu["kwargs"]["visible"])

            for s in menu["subnav"]:
                if s["title"]:
                    s["title"] = self._get_title(s["title"])

                if s["endpoint"] == request.endpoint:
                    s["active"] = True
                    menu["kwargs"]["active"] = True
                s["visible"] = self._test_visibility(s["visible"])
                menu_index += 1
                s["_id"] = str(menu_index)
                subnav.append(s)

            _kwargs = menu["kwargs"]

            if menu["title"]:
                _kwargs.update({
                    "subnav": self._sort(subnav),
                    "order": menu["order"],
                    "title": self._get_title(menu["title"])
                })
                menu_list.append(_kwargs)
            else:
                menu_list += subnav
            menu_index += 1

        return self._sort(menu_list)
1171570
protected function renderMainContent()
    {
        echo Html::beginTag('div', ['class' => 'social-login']);

        echo Html::tag('h2', Yii::t('users', 'Add social service'));

        foreach ($this->getClients() as $externalService) {
            if (!in_array(get_class($externalService), array_keys($this->services))) {
                $socialServiceId = SocialService::classNameToId(get_class($externalService));
                $i18n = SocialService::i18nNameById($socialServiceId);
                $this->clientLink(
                    $externalService,
                    '<i class="demo-icon icon-basic-' . $externalService->getName() . '"></i>',
                    [
                        'class' => "social-login__social-network social-login__social-network--"
                            . $externalService->getName(),
                        'title' => $i18n,
                    ]
                );
            }
        }
        echo Html::endTag('div');

        echo Html::tag('div', '', ['class' => 'clearfix']);
    }
547916
def main(self):
        
        self.loop = urwid.MainLoop(self.top, self.palettes[self.palette_names[0]], screen=self.tui,
                                   handle_mouse=False, input_filter=self.handle_keys,
                                   unhandled_input=self.unhandled)
        self.loop.run()
191210
public function run()
    {
        $MenuTypes = ['header', 'sidebar', 'footer'];

        foreach ($MenuTypes as $MenuType) {
            $Type = ['type' => $MenuType];

            factory(Menu::class, 5)->create($Type)->each(function ($u) use ($Type) {
                $u->children()->saveMany(factory(Menu::class, 2)->create($Type)
                    ->each(function ($p) use ($Type) {
                        $p->children()->saveMany(factory(Menu::class, 2)->make($Type));
                    }));
            });
        }
    }
664443
def view_main(self):
        
        print(self.format(remove='bnode',
                          sort=True,
                          pretty=True,
                          compress=True,
                          output='json',
                          base_only = True,
                          add_ids=True))
868704
function(menu, data) {
        if (!data.children || !data.children.length) {
            return;
        }

        var options = this.options,
            groups = [],
            ul,
            li,
            tag,
            limit = options.itemLimit,
            i, l;

        if (options.className) {
            menu.addClass(options.className);
        }

        menu
            .aria('expanded', false)
            .attr('role', 'menu');

        if (limit && data.children.length > limit) {
            i = 0;
            l = data.children.length;

            while (i < l) {
                groups.push(data.children.slice(i, i += limit));
            }
        } else {
            groups.push(data.children);
        }

        for (var g = 0, group, child; group = groups[g]; g++) {
            ul = $('<ul/>');

            for (i = 0, l = group.length; i < l; i++) {
                child = group[i];

                // Build tag
                if (child.url) {
                    li = $('<li/>');
                    tag = $('<a/>', {
                        text: child.title,
                        href: child.url,
                        role: 'menuitem'
                    });

                    // Add icon
                    $('<span/>')
                        .addClass(child.icon || (Toolkit.isRTL ? 'caret-left' : 'caret-right'))
                        .prependTo(tag);

                } else {
                    li = this.render(options.template);
                    tag = $('<span/>', {
                        text: child.title,
                        role: 'presentation'
                    });
                }

                if (child.attributes) {
                    tag.attr(child.attributes);
                }

                // Build list
                if (child.className) {
                    li.addClass(child.className);
                }

                li.append(tag).appendTo(ul);

                if (child.children && child.children.length) {
                    var childMenu = this.render(options.template)
                        .conceal()
                        .appendTo(li);

                    this._buildMenu(childMenu, child);

                    li.addClass('has-children')
                        .aria('haspopup', true)
                        .on('mouseenter', this.onPositionChild.bind(this, li))
                        .on('mouseleave', this.onHideChild.bind(this, li));
                }
            }

            menu.append(ul);
        }

        // Only monitor top level menu
        if (options.mode !== 'click' && menu.hasClass('is-root')) {
            menu.on({
                mouseenter: function() {
                    this.clearTimer('hide');
                }.bind(this),
                mouseleave: function() {
                    this.startTimer('hide', options.hideDelay);
                }.bind(this)
            });
        }
    }
356327
public function renderPhp(): void
	{
		$this->addBreadcrumbLink('dockbar.info.php');
		$this->template->php = $this->app->info->phpInfo;
	}
288332
def main():
    """"""
    if len(sys.argv) >= 2:
        cmd = sys.argv[1]
        if cmd == "help":
            print_usage()
        else:
            if cmd == "mensa":
                print_menu("Mensa")
            elif cmd == "bistro":
                print_menu("Bistro")
            elif cmd == "cafeteriab":
                print_menu("CB")
            elif cmd == "west":
                print_menu("West")
            elif cmd == "hochschule":
                print_menu("Prittwitzstr")
            elif cmd == "westside":
                print_menu("Diner", True)
            elif cmd == "burgerbar":
                print_menu("Burgerbar", True)
            else:
                print("[ERROR]: No valid place given")
                print_usage()
    else:
        print("[ERROR]: No argument given")
        print_usage()
1041204
public function mainMenuAuto()
    {
        $markup = null;

        $menu = false;
        $classes = array('nav');

        if (!$menu || !is_string($menu) || (isset($_GET['menu_cache']) && $_GET['menu_cache'] == 'false')) {
            if (!empty(get_field('nav_primary_align', 'option'))) {
                $classes[] = 'nav-' . get_field('nav_primary_align', 'option');
            }

            $menu = new \Municipio\Helper\NavigationTree(array(
                'theme_location' => 'main-menu',
                'include_top_level' => true,
                'render' => get_field('nav_primary_render', 'option'),
                'depth' => 1,
                'sublevel' => get_field('nav_primariy_second_level', 'option'),
                'classes' => implode(' ', apply_filters('Municipio/main_menu_classes', $classes)) . ' ' . apply_filters('Municipio/desktop_menu_breakpoint', 'hidden-xs hidden-sm')
            ));

            if (isset($menu) && $menu->itemCount() > 0) {
                $markup = apply_filters('Municipio/main_menu/items', $menu->render(false));
            }

            return $markup;
        }

        return $menu;
    }
456904
def render(self):
        """"""
        self.screen.fill(self.BACKGROUND_COLOR)

        for wid, cond in self._widgets:
            if cond():
                wid.render(self.screen)

        if self.BORDER_COLOR is not None:
            pygame.draw.rect(self.screen, self.BORDER_COLOR, ((0, 0), self.SCREEN_SIZE), 1)

        if self.SHOW_FPS:
            self.fps.render(self.screen)
133349
public function run()
    {
        echo $this->renderLogo();
        echo $this->renderMenuToggler();
        echo $this->renderNavigationMenu();

        echo Html::endTag('div');   //page-header-inner
        echo Html::endTag('div');   // page-header
    }
1074543
public function render()
    {
        parent::render();

        // malladmin stuff
        $oAuthUser = oxNew(\OxidEsales\Eshop\Application\Model\User::class);
        $oAuthUser->loadAdminUser();
        $blisMallAdmin = $oAuthUser->oxuser__oxrights->value == "malladmin";

        // User rights
        $aUserRights = [];
        $oLang = \OxidEsales\Eshop\Core\Registry::getLang();
        $iTplLang = $oLang->getTplLanguage();

        $iPos = count($aUserRights);
        $aUserRights[$iPos] = new stdClass();
        $aUserRights[$iPos]->name = $oLang->translateString("user", $iTplLang);
        $aUserRights[$iPos]->id = "user";

        if ($blisMallAdmin) {
            $iPos = count($aUserRights);
            $aUserRights[$iPos] = new stdClass();
            $aUserRights[$iPos]->id = "malladmin";
            $aUserRights[$iPos]->name = $oLang->translateString("Admin", $iTplLang);
        }

        $aUserRights = $this->calculateAdditionalRights($aUserRights);

        $soxId = $this->_aViewData["oxid"] = $this->getEditObjectId();
        if (isset($soxId) && $soxId != "-1") {
            // load object
            $oUser = oxNew(\OxidEsales\Eshop\Application\Model\User::class);
            $oUser->load($soxId);
            $this->_aViewData["edit"] = $oUser;

            if (!($oUser->oxuser__oxrights->value == "malladmin" && !$blisMallAdmin)) {
                // generate selected right
                reset($aUserRights);
                foreach ($aUserRights as $val) {
                    if ($val->id == $oUser->oxuser__oxrights->value) {
                        $val->selected = 1;
                        break;
                    }
                }
            }
        }

        // passing country list
        $oCountryList = oxNew(\OxidEsales\Eshop\Application\Model\CountryList::class);
        $oCountryList->loadActiveCountries($oLang->getObjectTplLanguage());

        $this->_aViewData["countrylist"] = $oCountryList;

        $this->_aViewData["rights"] = $aUserRights;

        if ($this->_sSaveError) {
            $this->_aViewData["sSaveError"] = $this->_sSaveError;
        }

        if (!$this->_allowAdminEdit($soxId)) {
            $this->_aViewData['readonly'] = true;
        }
        if (\OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter("aoc")) {
            $oUserMainAjax = oxNew(\OxidEsales\Eshop\Application\Controller\Admin\UserMainAjax::class);
            $this->_aViewData['oxajax'] = $oUserMainAjax->getColumns();

            return "popups/user_main.tpl";
        }

        return "user_main.tpl";
    }