<commit_before><?php
/**
 * @version     $Id: menubar.php 4813 2012-08-21 02:25:31Z johanjanssens $
 * @package     Nooku_Server
 * @subpackage  Application
 * @copyright   Copyright (C) 2007 - 2012 <NAME>. All rights reserved.
 * @license     GNU GPLv3 <http://www.gnu.org/licenses/gpl.html>
 * @link        http://www.nooku.org
 */

/**
 * Template Menubar Helper
 *
 * @author      <NAME> <http://nooku.assembla.com/profile/johanjanssens>
 * @package     Nooku_Server
 * @subpackage  Application
 */
class ComApplicationTemplateHelperMenubar extends KTemplateHelperAbstract
{
 	/**
     * Render the menubar
     *
     * @param   array   An optional array with configuration options
     * @return  string  Html
     */
    public function render($config = array())
    {
        $config = new KConfig($config);
        $config->append(array(
            'attribs' => array('class' => array())
        ));
        
        $result = '';
        
        $menus = $this->getService('com://admin/pages.model.menus')
            ->application('admin')
            ->getList();
        
        $menu = $menus->find(array('slug' => 'menubar'));
        
        if(count($menu))
        {
            $pages  = $this->getService('application.pages')->find(array('pages_menu_id' => $menu->top()->id));
            $result = $this->getService('com://admin/pages.template.helper.list')->pages(array('pages' => $pages, 'attribs' => $config->attribs));
        }   

        return $result;
    }
}<commit_msg>KModel::getList() had been renamed to KModel::getRowset()<commit_after><?php
/**
 * @version     $Id: menubar.php 4813 2012-08-21 02:25:31Z johanjanssens $
 * @package     Nooku_Server
 * @subpackage  Application
 * @copyright   Copyright (C) 2007 - 2012 <NAME>. All rights reserved.
 * @license     GNU GPLv3 <http://www.gnu.org/licenses/gpl.html>
 * @link        http://www.nooku.org
 */

/**
 * Template Menubar Helper
 *
 * @author      <NAME> <http://nooku.assembla.com/profile/johanjanssens>
 * @package     Nooku_Server
 * @subpackage  Application
 */
class ComApplicationTemplateHelperMenubar extends KTemplateHelperAbstract
{
 	/**
     * Render the menubar
     *
     * @param   array   An optional array with configuration options
     * @return  string  Html
     */
    public function render($config = array())
    {
        $config = new KConfig($config);
        $config->append(array(
            'attribs' => array('class' => array())
        ));

        $result = '';

        $menus = $this->getService('com://admin/pages.model.menus')
            ->application('admin')
            ->getRowset();

        $menu = $menus->find(array('slug' => 'menubar'));

        if(count($menu))
        {
            $pages  = $this->getService('application.pages')->find(array('pages_menu_id' => $menu->top()->id));
            $result = $this->getService('com://admin/pages.template.helper.list')->pages(array('pages' => $pages, 'attribs' => $config->attribs));
        }

        return $result;
    }
}
{'fraction_non_alphanumeric': 0.16352201257861634, 'fraction_numerical': 0.01787487586891758, 'mean_word_length': 2.4458380843785634, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 47, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6963256', 'n_tokens_mistral': 997, 'n_tokens_neox': 943, 'n_words': 175}