Returns a full HTML rendering of the CMS navigation menu

@return string
11741
protected function menu()
    {

        $this->Benchmark->start('getMenu');
        try {
            $menu = $this->CMSNavItemService->getMenu();
        } catch (Exception $e) {
            return '';
        }
        $this->Benchmark->end('getMenu');

        $this->Benchmark->start('buildMenu');
        $dom_id    = $this->getParameter('id');
        $dom_class = $this->getParameter('class');

        $this->matchedCurrentURI = false;

        $root_options = array();
        if (!empty($dom_id))
            $root_options[] = "id='{$dom_id}'";
        if (!empty($dom_class))
            $root_options[] = "class='{$dom_class}'";

        $family_tree = "<ul " . join(' ', $root_options). ">\n";

        $this->requestURI = ltrim($this->Request->getAdjustedRequestURI(), '/');

        foreach ( $menu as $parent ) {
            $family_tree .= $this->_buildMenuTree($parent, "parent", "<span>%s</span>", true);
        }

        $family_tree .= "</ul>\n";
        $this->Benchmark->end('buildMenu');

        return $family_tree;
    }
82737
public function indexAction()
    {
        $navigation = $this->getServiceLocator()
                           ->get( 'Grid\Menu\Model\Menu\Model' )
                           ->findNavigation();

        $view = new ViewModel( array(
            'navigation' => $navigation,
        ) );

        $this->getResponse()
             ->getHeaders()
             ->addHeaderLine( 'Content-Type', 'application/xml' );

        return $view->setTerminal( true );
    }
312696
public function render()
    {
        if (empty($this->breadcrumbs)) {
            return '';
        }

        $cssClasses = implode(' ', $this->breadcrumbsCssClasses);

        return '<'. $this->listElement . ' itemscope itemtype="http://schema.org/BreadcrumbList"'
                .' class="' . $cssClasses .'">'
                . $this->renderCrumbs()
                . '</'. $this->listElement .'>';
    }
507110
public function render()
    {
        Merchant::script($this->script());

        $options = $this->getOptions()->map(function ($option) {
            $selected = ($option == $this->perPage) ? 'selected' : '';
            $url = app('request')->fullUrlWithQuery([$this->perPageName => $option]);

            return "<option value=\"$url\" $selected>$option</option>";
        })->implode("\r\n");

        $show = trans('merchant.show');
        $entries = trans('merchant.entries');

        return <<<EOT

<label class="control-label pull-right" style="margin-right: 10px; font-weight: 100;">

        <small>$show</small>&nbsp;
        <select class="input-sm grid-per-pager" name="per-page">
            $options
        </select>
        &nbsp;<small>$entries</small>
    </label>

EOT;
    }
135961
public function navigationStatus(): string
    {
        return trans('tablelist::tablelist.tfoot.nav', [
            'start' => ($this->getAttribute('list')->perPage()
                        * ($this->getAttribute('list')->currentPage() - 1))
                       + 1,
            'stop'  => $this->getAttribute('list')->count()
                       + (($this->getAttribute('list')->currentPage() - 1)
                          * $this->getAttribute('list')->perPage()),
            'total' => $this->getAttribute('list')->total(),
        ]);
    }
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);
    }
1253180
public function render()
    {
        $htmlContent = '';
        foreach (self::$iconList->toArray() as $icon) {
            $htmlContent .= '<link href="' . $icon[0] . '" rel="icon">' . PHP_EOL;
        }
        return $htmlContent;
    }
795319
public function render(): string
    {
        $append = str_replace(trim($this->insert), '', $this->insert);

        return "[" . trim($this->escape($this->insert)) . "]({$this->attributes['link']})" . $append;
    }
148741
private function render() : string
    {
        $styles = $this->styles();
        if (strlen($styles) > 0) {
            $styles = 'style="' . $this->view->escapeHtmlAttr(trim($styles)) . '"';
        }

        return '
            <div class="progress">
                <div class="progress-bar' . $this->classes() . '" role="progressbar" ' . $styles .
            ' aria-valuenow="' . $this->value . '" aria-valuemin="0" aria-valuemax="100">' .
            (($this->label !== null) ? $this->view->escapeHtml($this->label) : null) . '</div>
            </div>';
    }
1318917
public function render($menu_level = 0)
    {
        static::activateIfItemIsActive($this);

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

        if ($this->checkItemIsActive($this)
            && (($this->getHideIfNotActiveOption() && $this->getActive())
            || !$this->getHideIfNotActiveOption())) {

            // Available options for this item.
            $container_tag = array_get($this->option, 'container_tag', 'ul');
            $container_class = array_get($this->option, 'container_class', 'nav');
            $item_tag = array_get($this->option, 'item_tag', 'li');
            $text_only = array_get($this->option, 'text_only', false);
            $hide_children = array_get($this->option, 'hide_children', false);
            $force_inactive = array_get($this->option, 'force_inactive', false);
            $before_tag_html = array_get($this->option, 'before_tag', '');
            $after_tag_html = array_get($this->option, 'after_tag', '');

            $html = (!$text_only && $this->html != '') ? $this->html : $this->title;

            // Force the menu items to not show active.
            if ($force_inactive) {
                $this->setActive(false);
            }

            // Link is not empty.
            if ($this->link_type !== self::LINK_EMPTY) {
                // Create the link.
                $html_link = Html::a()->text($html)
                    ->openNew(!$this->getOpenNewWindowOption())
                    ->href($this->generateUrl())
                    ->title($this->title);

                if (!$text_only) {
                    $html_link->addAttributes($this->link_attribute);
                }

                $html = $html_link->s();
            } elseif (!empty($this->title)) {
                $html = Html::span($html)->title($this->title);

                if (!$text_only) {
                    $html->addAttributes($this->link_attribute);
                }
            }

            // Generate each of the children items.
            if (!$hide_children && $this->hasChildren()) {
                $child_html = '';

                $item_callback = array_get($this->option, 'item_callback', null);

                // Generate each child menu item (repeat this method)
                foreach ($this->children() as $item) {
                    $item->setItemTagOption($item_tag);

                    if (!is_null($item_callback) && is_callable($item_callback)) {
                        $item_callback($item);
                        $item->setItemCallbackOption($item_callback);
                    }

                    $child_html .= $item->render($menu_level + 1);
                }

                if ($child_html !== '') {
                    // Name the level
                    $number_as_word = (new NumberConverter())->ordinal($menu_level);

                    // Generate the list container
                    $html_container = Html::$container_tag($child_html)
                        ->addAttributes($this->container_attribute)
                        ->addClass($container_class)
                        ->addClass(sprintf('%s-%s-level', $container_class, $number_as_word));

                    $html .= $html_container->s();
                }
            }

            if ($this->generateUrl() == \Request::url()
                && !$this->hasChildren()) {
                $this->addItemAttribute('class', 'actual-link');
            }

            // Create the container and allocate the link.
            return Html::$item_tag($before_tag_html.$html.$after_tag_html)->addAttributes($this->item_attribute)->s();
        }

        return '';
    }
1371125
public function render()
    {
        if (!$this->grid->showPagination()) {
            return '';
        }

        return $this->paginationRanger().
            $this->paginationLinks().
            $this->perPageSelector();
    }
55493
public function render()
    {
        $output = '';

        foreach ($this->entries as $entry) {
            $entryAttributes = [];

            if ($entry instanceof Dropdown) {
                $entryAttributes['class'] = 'dropdown';

                foreach ($entry->getEntries() as $dropdownEntry) {
                    if ($dropdownEntry instanceof LinkRoute) {
                        foreach ($dropdownEntry->getAdditionalRouteNames() as $additionalRouteName) {
                            if (MenuHelper::isCurrentRoute($additionalRouteName)) {
                                $entryAttributes['class'] .= ' active';
                            }
                        }

                        if (MenuHelper::isCurrentRoute($dropdownEntry->getName())) {
                            $entryAttributes['class'] .= ' active';
                        }
                    }
                }
            } elseif ($entry instanceof Content) {
                $entryAttributes['class'] = 'navbar-text';
            } else if ($entry instanceof Link) {

            } else {
                if (!array_key_exists('class', $entryAttributes)) {
                    $entryAttributes['class'] = '';
                }

                foreach ($entry->getAdditionalRouteNames() as $additionalRouteName) {
                    if (MenuHelper::isCurrentRoute($additionalRouteName)) {
                        $entryAttributes['class'] .= ' active';
                    }
                }

                if (MenuHelper::isCurrentRoute($entry->getName())) {
                    $entryAttributes['class'] .= ' active';
                }
            }

            if ($entry->isVisible()) {
                if (count(MenuHelper::getConfig()->getListElementClasses()) > 0) {
                    if (!array_key_exists('class', $entryAttributes)) {
                        $entryAttributes['class'] = '';
                    }

                    foreach (MenuHelper::getConfig()->getListElementClasses() as $listElementClass) {
                        $entryAttributes['class'] .= ' ' . $listElementClass;
                    }
                }

                $output .= '<li ' . Html::attributes($entryAttributes) . '>' . $entry->render() . '</li>';
            }
        }

        return '<ul ' . Html::attributes($this->attributes) . '>' . $output . '</ul>';
    }
1064832
public function render()
    {
        if (!$this->grid->allowExport()) {
            return '';
        }

        $this->setUpScripts();

        $export = trans('admin.export');
        $all = trans('admin.all');
        $currentPage = trans('admin.current_page');
        $selectedRows = trans('admin.selected_rows');

        $page = request('page', 1);

        return <<<EOT

<div class="btn-group pull-right" style="margin-right: 10px">
    <a class="btn btn-sm btn-twitter"><i class="fa fa-download"></i> {$export}</a>
    <button type="button" class="btn btn-sm btn-twitter dropdown-toggle" data-toggle="dropdown">
        <span class="caret"></span>
        <span class="sr-only">Toggle Dropdown</span>
    </button>
    <ul class="dropdown-menu" role="menu">
        <li><a href="{$this->grid->exportUrl('all')}" target="_blank">{$all}</a></li>
        <li><a href="{$this->grid->exportUrl('page', $page)}" target="_blank">{$currentPage}</a></li>
        <li><a href="{$this->grid->exportUrl('selected', '__rows__')}" target="_blank" class='export-selected'>{$selectedRows}</a></li>
    </ul>
</div>
&nbsp;&nbsp;

EOT;
    }
798037
private function render(): string
    {
        switch ($this->mode) {
            case 'button':
                $html = '<button class="btn' . $this->classes() . '" type="submit" ' .
                    (($this->disabled === true) ? 'disabled ' : null) .
                    '>' . $this->view->escapeHtml($this->label) . '</button>';
                break;

            case 'input':
                $html = '<input class="btn' . $this->classes() . '" type="' .
                    $this->input_type . '" value="' .
                    $this->view->escapeHtml($this->label) . '" ' .
                    (($this->disabled === true) ? ' disabled ' : null) . '/>';
                break;

            default:
                $html = '<a href="' . (($this->link !== null) ? $this->view->escapeUrl($this->link) : '#') .
                    '" class="btn' . $this->classes() .
                    (($this->disabled === true) ? ' disabled' : null) .
                    '" role="button">' . $this->view->escapeHtml($this->label) . '</a>';
                break;
        }

        return $html;
    }
999769
public function renderAction()
    {
        $params     = $this->params();
        $navigation = $this->getServiceLocator()
                           ->get( 'Grid\Menu\Model\Menu\Model' )
                           ->findNavigation( $params->fromRoute( 'id' ) );

        $view = new ViewModel( array(
            'navigation' => $navigation,
            'class'      => $params->fromRoute( 'class' ),
        ) );

        return $view->setTerminal( true );
    }
1127662
public function render() {

		$html = '';

		foreach ( $this->all() as $name => $value ) {

			$esc_value = '';

			// If the value is a link `href`, use `esc_url()`.
			if ( $value !== false && 'href' === $name ) {
				$esc_value = esc_url( $value );

			} elseif ( $value !== false ) {
				$esc_value = esc_attr( $value );
			}

			$html .= false !== $value ? sprintf( ' %s="%s"', esc_html( $name ), $esc_value ) : esc_html( " {$name}" );
		}

		return trim( $html );
	}
93451
public function getPageNavigation()
    {
        if ($this->_oPageNavigation === null) {
            $this->_oPageNavigation = $this->generatePageNavigation();
        }

        return $this->_oPageNavigation;
    }