Renders the top level menu items into a html element

@return \MUtil_Html_HtmlElement
771388
public function toActiveBranchElement()
    {
        $request    = $this->_getOriginalRequest();
        $activePath = $this->_findPath($request);

        if (! $activePath) {
            return null;
        }

        $this->setBranchVisible($activePath);

        $activeItem = array_pop($activePath);

        if (! $activeItem instanceof \Gems_Menu_SubMenuItem) {
            return null;
        }
        // \MUtil_Echo::track($activeItem->get('label'));

        $parameterSources[] = $request;

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

        $source = new \Gems_Menu_ParameterCollector($parameterSources);
        // self::$verbose = true;

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

        $ul = $this->renderFirst();

        foreach ($nav as $item => $sub) {
            if ($sub['label'] === $activeItem->get('label')) {

                if (isset($sub['pages'])) {
                    $this->renderItems($ul, $sub['pages'], true);
                }

                return $ul;
            }
        }

        return null;
    }
1082025
public function render()
    {
        if ($this->options['enableListButton']) {
            $this->add($this->listButton());
        }

        if ($this->options['enableBackButton']) {
            $this->add($this->backButton());
        }

        return $this->tools->map(function ($tool) {
            if ($tool instanceof Renderable) {
                return $tool->render();
            }

            if ($tool instanceof Htmlable) {
                return $tool->toHtml();
            }

            return (string) $tool;
        })->implode(' ');
    }
1294020
public function render()
    {
        if ($this->help instanceof Group\Help) {
            foreach ($this->childNodes as $childNode) {
                if ($childNode instanceof Elements\Input or
                    $childNode instanceof Elements\Checkbox or
                    $childNode instanceof Elements\Select or
                    $childNode instanceof Elements\Textarea
                ) {
                    if (false !== ($attributeId = $childNode->attributes->getAttributeId())) {
                        $this->help->attributes->setAttributeId('help-' . $attributeId);
                        $childNode->attributes->addAttribute('aria-describedby', 'help-' . $attributeId);
                    }
                }
            }
        }

        return parent::render();
    }
1144508
public function render()
    {
        // Massage the response from base controller subclassings of sidebar
        $items = array_map(function ($item) {

            // If a listing instance, apply defaults common to all sidebar instances
            if (is_a($item, 'Bkwld\Decoy\Fields\Listing')) {
                return $item->layout('sidebar')->parent($this->parent)->__toString();
            }

            // Anything else will be converted to a string in the next step
            return $item;
        }, array_merge($this->items, $this->ending_items));

        // Combine all listing items into a single string and return
        return array_reduce($items, function ($carry, $item) {
            return $carry.$item;
        }, '');
    }
151001
public function renderForm()
    {
        $html = $this->form_open();
        $html .= $this->renderSubForm();
        $html .= $this->form_close();

        return $html;
    }
299550
public function render()
    {
        $output[] = $this->open();

        if ($this->title instanceof Element) {
            $this->title->attributes->addAttributeClass('card-title');
            $output[] = $this->title;
        }

        if ($this->subTitle instanceof Element) {
            $this->subTitle->attributes->addAttributeClass('card-subtitle');
            $output[] = $this->subTitle;
        }

        if ($this->paragraphs instanceof ArrayIterator) {
            if ($this->paragraphs->count()) {
                foreach ($this->paragraphs as $paragraph) {
                    $paragraph->attributes->addAttributeClass('card-text');
                    $output[] = $paragraph;
                }
            }
        }

        if ($this->hasTextContent()) {
            $output[] = implode('', $this->textContent);
        }

        if ($this->hasChildNodes()) {
            $output[] = implode(PHP_EOL, $this->childNodes);
        }

        $output[] = $this->close();

        return implode(PHP_EOL, $output);
    }
751653
public function renderElements()
	{
		$output='';
		foreach($this->getElements() as $element)
			$output.=$this->renderElement($element);
		return $output;
	}
810083
public function render() {

		// check authentication

		if(!$this->authenticateMenu($this->menu)) {
			return '';
		}

		$request = Request::createFromGlobals();
		
		// if menu has not been prepared yet, do it now (caching avoids re-parsing for submenus)

		if(!in_array($this->menu, self::$primedMenus, true)) {

			// clear selected menu entries (which remain in the session)

			$this->clearSelectedMenuEntries($this->menu);

			// walk entire menu and add dynamic entries where necessary
			
			$this->completeMenu($this->menu);
			
			// prepare path segments to identify active menu entries

			$this->pathSegments = explode('/', trim($request->getPathInfo(), '/'));

			// skip script name

			if($this->rewriteActive && basename($request->getScriptName()) != 'index.php') {
				array_shift($this->pathSegments);
			}

			// skip locale if one found

			if(count($this->pathSegments) && Application::getInstance()->hasLocale($this->pathSegments[0])) {
				array_shift($this->pathSegments);
			}

			// walk tree until an active entry is reached

			$this->walkMenuTree($this->menu, (!count($this->pathSegments) || $this->pathSegments[0] === '') ? explode('/', $this->route->getPath()) : $this->pathSegments);

			// cache menu for multiple renderings

			self::$primedMenus[] = $this->menu;
		}

		$htmlId = $this->id . 'menu';

		// drill down to required submenu (if only submenu needs to be rendered)

		$m = $this->menu;

		if($this->level !== false) {

			$htmlId .= '_level_' . $this->level;

			if($this->level > 0) {

				while($this->level-- > 0) {
					$e = $this->menu->getSelectedEntry();
					if(!$e || !$e->getSubMenu()) {
						break;
					}
					$m = $e->getSubMenu();
				}

				if($this->level >= 0) {
					return '';
				}

			}
		}

		// output

		// instantiate renderer class, defaults to SimpleListRenderer

		if(!empty($this->decorator)) {
			$rendererName = $this->decorator;
		}
		else {
			$rendererName = 'SimpleList';
		}

		$className = __NAMESPACE__ . '\\Menu\\Renderer\\' . $rendererName . 'Renderer';

		$renderer = new $className($m);
		$renderer->setParameters($this->renderArgs);

		// enable or disable display of submenus

		$m->setShowSubmenus($this->level === false);

		// enable or disable always active menu

		$m->setForceActive(self::$forceActiveMenu);

		// if no container tag was specified, use a DIV element

		if(!isset($this->renderArgs['containerTag'])) {
			$this->renderArgs['containerTag'] = 'div';
		}

		// omit wrapper, if a falsy container tag was specified

		if($this->renderArgs['containerTag']) {
			return sprintf(
				'<%1$s%2$s>%3$s</%1$s>',
				$this->renderArgs['containerTag'],
				(isset($this->renderArgs['omitId']) && $this->renderArgs['omitId']) ? '' : (' id="' . $htmlId . '"'),
				$renderer->render()
			);
		}

		return $renderer->render();

	}
830496
public function render()
    {
        parent::render();

        $oParentView = $this->getParent();

        // add content for main menu
        $oContentList = oxNew(\OxidEsales\Eshop\Application\Model\ContentList::class);
        $oContentList->loadMainMenulist();
        $oParentView->setMenueList($oContentList);

        return;
    }
1235335
public function render()
    {
        if ($this->title instanceof Element) {
            $this->title->attributes->addAttributeClass('card-title');
            $this->childNodes->push($this->title);
        }

        if ($this->subTitle instanceof Element) {
            $this->subTitle->attributes->addAttributeClass('card-subtitle');
            $this->childNodes->push($this->subTitle);
        }

        if ($this->paragraph instanceof Element) {
            $this->paragraph->attributes->addAttributeClass('card-text');
            $this->childNodes->push($this->paragraph);
        }

        if ($this->links instanceof ArrayIterator) {
            if ($this->links->count()) {
                foreach ($this->links as $link) {
                    $link->attributes->addAttributeClass('card-link');
                    $this->childNodes->push($link);
                }
            }
        }

        if ($this->hasChildNodes()) {
            $this->collapse->attributes->setAttributeId($this->attributes->getAttributeId());
            $this->attributes->removeAttribute('id');

            $body = new Element('div', 'body');
            $body->attributes = $this->attributes;
            $body->textContent = $this->textContent;
            $body->childNodes = $this->childNodes;

            $this->collapse->childNodes->push($body);

            return $this->collapse->render();
        }

        return '';
    }
1297588
public function render()
    {
        $this->initPlainInput();

        $this->prepend('<i class="fa fa-pencil fa-fw"></i>')
            ->defaultAttribute('type', 'text')
            ->defaultAttribute('id', $this->id)
            ->defaultAttribute('name', $this->elementName ?: $this->formatName($this->column))
            ->defaultAttribute('value', old($this->column, $this->value()))
            ->defaultAttribute('class', 'form-control '.$this->getElementClassString())
            ->defaultAttribute('placeholder', $this->getPlaceholder());

        $this->addVariables([
            'prepend' => $this->prepend,
            'append'  => $this->append,
        ]);

        return parent::render();
    }
958824
public function render(): string
    {
        $tag = $this->wrapperTagName
            ? new Tag($this->wrapperTagName, $this->htmlAttributes)
            : null;

        $contents = array_map([$this, 'renderItem'], $this->items);

        $wrappedContents = $tag ? $tag->withContents($contents) : implode('', $contents);

        $menu = $this->prepend.$wrappedContents.$this->append;

        if (! empty($this->wrap)) {
            return Tag::make($this->wrap[0], new Attributes($this->wrap[1]))->withContents($menu);
        }

        return $menu;
    }
914832
public function display()
    {
        if (!$this->isVisible()) { //return nothing if it's not visible
            return "";
        }
        $content = Html::get()->link($this->getURL(), $this->getIcon() . $this->translate($this->label), $this->linkHtmlOptions);
        $submenu = "";
        $anySelected = false;
        if (count($this->items)) {
            $this->htmlOptions['class'] = (isset($this->htmlOptions['class']) ? $this->htmlOptions['class'] . ' ' : '') . 'm-menu-dropdown';
            $anySelected = false;
            $anyVisible = false;
            foreach ($this->items as $item) {
                /* @var $item Label */
                $submenu .= $item->display();
                $anySelected = $anySelected || $item->isSelected();
                $anyVisible = $anyVisible || $item->isVisible();
            }
            if ($anyVisible)
                $submenu = Html::get()->tag('ul', $submenu);
            else
                $submenu = "";
            if ($anySelected) {
                if (isset($this->htmlOptions['class'])) {
                    $this->htmlOptions['class'] .= ' selected';
                } else {
                    $this->htmlOptions['class'] = 'selected';
                }
            }
        }

        if ($anySelected || $this->isSelected()) {
            $this->htmlOptions['class'] = isset($this->htmlOptions['class']) ? $this->htmlOptions['class'] . ' selected' : 'selected';
        }

        return Html::get()->tag('li', $content . $submenu, $this->htmlOptions);
    }
797292
public function render()
	{
		$list	= array();
		foreach( $this->listItems as $item )
			$list[]	= $this->renderInner( $item );
		return UI_HTML_Tag::create( "ol", join( $list ), $this->getAttributes() );
	}
1370483
public function display()
    {
        if (!$this->isVisible())
            return "";

        $content = \mpf\web\helpers\Html::get()->tag('span', $this->getIcon() . $this->translate($this->label), $this->labelHtmlOptions);
        $submenu = "";
        if (count($this->items)) {
            $this->htmlOptions['class'] = (isset($this->htmlOptions['class']) ? $this->htmlOptions['class'] . ' ' : '') . 'm-menu-dropdown';
            $anySelected = false;
            $anyVisible = false;
            foreach ($this->items as $item) {
                /* @var $item Label */
                $submenu .= $item->display();
                $anySelected = $anySelected || $item->isSelected();
                $anyVisible = $anyVisible || $item->isVisible();
            }
            if ($anyVisible)
                $submenu = \mpf\web\helpers\Html::get()->tag('ul', $submenu);
            else
                $submenu = "";
            if ($anySelected) {
                if (isset($this->htmlOptions['class'])) {
                    $this->htmlOptions['class'] .= ' selected';
                } else {
                    $this->htmlOptions['class'] = 'selected';
                }
            }
        }
        return \mpf\web\helpers\Html::get()->tag('li', $content . $submenu, $this->htmlOptions);
    }
1198618
public function renderItems()
    {
        $items = [];
        for ($i = 0, $count = count($this->items); $i < $count; $i++) {
            $items[] = Html::tag('li', $this->items[$i], $this->itemOptions);
        }

        return Html::tag('ul', implode("\n", $items), $this->containerOptions);
    }
753623
public function html() {
        global $OUTPUT;

        $options = $this->options;
        $selected = $this->selected;

        $context = array(
            'name' => $this->name,
            'value' => $this->selected,
            'tabindex' => 1,
            'disabled' => !empty($this->isdisabled),
            'options' => array_map(function($option) use ($options, $selected) {
                return [
                    'name' => $options[$option],
                    'value' => $option,
                    'selected' => $selected == $option
                ];
            }, array_keys($options))
        );

        return $OUTPUT->render_from_template('gradereport_singleview/dropdown_attribute', $context);
    }