code/libraries/joomlatools/component/koowa/template/helper/menubar.php
public function render($config = array())
    {
        $config = new KObjectConfigJson($config);
        $config->append(array(
            'toolbar' => null
        ));

        $html = '<ul class="k-navigation">';

        foreach ($config->toolbar->getCommands() as $command)
        {
            $command->append(array(
                'attribs' => array(
                    'href' => '#',
                    'class' => array()
                )
            ));

            if(!empty($command->href)) {
                $command->attribs['href'] = $this->getTemplate()->route($command->href);
            }

            $url = KHttpUrl::fromString($command->attribs->href);

            if (isset($url->query['view'])) {
                $command->attribs->class->append('k-navigation-'.$url->query['view']);
            }

            $attribs = clone $command->attribs;
            $attribs->class = implode(" ", KObjectConfig::unbox($attribs->class));

            $html .= '<li'.($command->active ? ' class="k-is-active"' : '').'>';
            $html .= '<a '.$this->buildAttributes($attribs).'>';
            $html .= $this->getObject('translator')->translate($command->label);
            $html .= '</a>';
            $html .= '</li>';
        }

        $html .= '</ul>';

        return $html;
    }
public function render($config = array())
    {
        $config = new KObjectConfigJson($config);
        $config->append(array(
            'toolbar' => null
        ));

        $html = '<ul class="k-navigation">';

        foreach ($config->toolbar->getCommands() as $command)
        {
            $command->append(array(
                'attribs' => array(
                    'href' => '#',
                    'class' => array()
                )
            ));

            if(!empty($command->href)) {
                $command->attribs['href'] = $this->getTemplate()->route($command->href);
            }

            $url = KHttpUrl::fromString($command->attribs->href);

            if (isset($url->query['view'])) {
                $command->attribs->class->append('k-navigation-'.$url->query['view']);
            }

            $attribs = clone $command->attribs;
            $attribs->class = implode(" ", KObjectConfig::unbox($attribs->class));

            $html .= '<li'.($command->active ? ' class="k-is-active"' : '').'>';
            $html .= '<a '.$this->buildAttributes($attribs).'>';
            $html .= $this->getObject('translator')->translate($command->label);
            $html .= '</a>';
            $html .= '</li>';
        }

        $html .= '</ul>';

        return $html;
    }
public function render ( $ config = array ( ) ) { $ config = new KObjectConfigJson ( $ config ) ; $ config -> append ( array ( 'toolbar' => null ) ) ; $ html = '<ul class="k-navigation">' ; foreach ( $ config -> toolbar -> getCommands ( ) as $ command ) { $ command -> append ( array ( 'attribs' => array ( 'href' => '#' , 'class' => array ( ) ) ) ) ; if ( ! empty ( $ command -> href ) ) { $ command -> attribs [ 'href' ] = $ this -> getTemplate ( ) -> route ( $ command -> href ) ; } $ url = KHttpUrl :: fromString ( $ command -> attribs -> href ) ; if ( isset ( $ url -> query [ 'view' ] ) ) { $ command -> attribs -> class -> append ( 'k-navigation-' . $ url -> query [ 'view' ] ) ; } $ attribs = clone $ command -> attribs ; $ attribs -> class = implode ( " " , KObjectConfig :: unbox ( $ attribs -> class ) ) ; $ html .= '<li' . ( $ command -> active ? ' class="k-is-active"' : '' ) . '>' ; $ html .= '<a ' . $ this -> buildAttributes ( $ attribs ) . '>' ; $ html .= $ this -> getObject ( 'translator' ) -> translate ( $ command -> label ) ; $ html .= '</a>' ; $ html .= '</li>' ; } $ html .= '</ul>' ; return $ html ; }
Render the menu bar

@param   array   $config An optional array with configuration options
@return  string  Html
Render the menu bar