<commit_before><?php
/**
 * Menübox. Speichert in Template-Variable alle Werte, die
 * für das Menü benötigt werden.
 * @package Vpc
 */
class Vpc_Menu_Component extends Vpc_Menu_Abstract
{
    public static function getSettings()
    {
        $ret = parent::getSettings();
        $ret['maxLevel'] = 1;
        $ret['generators']['subMenu'] = array(
            'class' => 'Vpc_Menu_Generator',
            'component' => 'Vpc_Menu_Component'
        );
        $ret['separator'] = '';
        $ret['linkPrefix'] = '';
        $ret['cssClass'] = 'webStandard printHidden';
        return $ret;
    }
    public function getTemplateVars()
    {
        $ret = parent::getTemplateVars();
        $ret['menu'] = $this->_getMenuData();
        $ret['level'] = $this->_getSetting('level');
        $ret['subMenu'] = $this->getData()->getChildComponent('-subMenu');
        $ret['separator'] = $this->_getSetting('separator');
        $ret['linkPrefix'] = $this->_getSetting('linkPrefix');
        return $ret;
    }
    public function hasContent()
    {
        if (count($this->_getMenuData())) return true;<commit_msg>moeglichkeit eingebaut um ein leeres menue zu haben wenn nur ein einziger menuepunkt vorhanden ist<commit_after><?php
/**
 * Menübox. Speichert in Template-Variable alle Werte, die
 * für das Menü benötigt werden.
 * @package Vpc
 */
class Vpc_Menu_Component extends Vpc_Menu_Abstract
{
    public static function getSettings()
    {
        $ret = parent::getSettings();
        $ret['maxLevel'] = 1;
        $ret['generators']['subMenu'] = array(
            'class' => 'Vpc_Menu_Generator',
            'component' => 'Vpc_Menu_Component'
        );
        $ret['separator'] = '';
        $ret['linkPrefix'] = '';
        $ret['cssClass'] = 'webStandard printHidden';
        $ret['emptyIfSingleEntry'] = false;
        return $ret;
    }
    public function getTemplateVars()
    {
        $ret = parent::getTemplateVars();
        $ret['menu'] = $this->_getMenuData();
        if ($this->_getSetting('emptyIfSingleEntry')) {
            if (count($ret['menu']) == 1) {
                $ret['menu'] = array();
            }
        }
        $ret['level'] = $this->_getSetting('level');
        $ret['subMenu'] = $this->getData()->getChildComponent('-subMenu');
        $ret['separator'] = $this->_getSetting('separator');
        $ret['linkPrefix'] = $this->_getSetting('linkPrefix');
        return $ret;
    }
    public function hasContent()
    {
        $c = count($this->_getMenuData());
        if ($this->_getSetting('emptyIfSingleEntry')) {
            if ($c > 1) return true;
        } else if ($c > 0) {
            return true;
        }
{'fraction_non_alphanumeric': 0.16641735228122662, 'fraction_numerical': 0.0018698578908002991, 'mean_word_length': 2.5809906291834004, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 25, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, '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': '7621581', 'n_tokens_mistral': 798, 'n_tokens_neox': 794, 'n_words': 161}