<commit_before><?php
class Vpc_Box_Search_Component extends Vpc_Abstract
{
    public static function getSettings()
    {
        $ret = parent::getSettings();

        $ret['generators']['ajax'] = array(
            'class'     => 'Vps_Component_Generator_Page_Static',
            'component' => 'Vpc_Box_Search_Ajax_Component',
            'name'      => 'Ajax'
        );

        $ret['assets']['dep'][] = 'ExtCore';
        $ret['assets']['dep'][] = 'ExtUpdateManager';
        $ret['assets']['dep'][] = 'VpsClearOnFocus';
        $ret['assets']['files'][] = 'vps/Vpc/Box/Search/Component.js';

        $ret['placeholder']['searchButton'] = trlVps('Search');
        $ret['placeholder']['clearOnFocus'] = trlVps('Search term');
        $ret['placeholder']['initialResultText'] = trlVps('Please type at least two characters.');

        return $ret;
    }

    public function getTemplateVars()
    {
        $ret = parent::getTemplateVars();
        $ret['ajaxUrl'] = $this->getData()->getChildComponent('_ajax')->url;
        $ret['searchPageUrl'] = $this->_getSearchPageUrl();
        return $ret;
    }

    public function getSearchComponents()
    {
        return array();
    }

    protected function _getSearchPageUrl()
    {
        return '/firmenverzeichnis/verzeichnissuche';
    }
}<commit_msg>klasse abstrakt gemacht da diese fkt überschrieben werden müssen um sinnvoll zu sein standard-wert für url entfernt<commit_after><?php
abstract class Vpc_Box_Search_Component extends Vpc_Abstract
{
    public static function getSettings()
    {
        $ret = parent::getSettings();

        $ret['generators']['ajax'] = array(
            'class'     => 'Vps_Component_Generator_Page_Static',
            'component' => 'Vpc_Box_Search_Ajax_Component',
            'name'      => 'Ajax'
        );

        $ret['assets']['dep'][] = 'ExtCore';
        $ret['assets']['dep'][] = 'ExtUpdateManager';
        $ret['assets']['dep'][] = 'VpsClearOnFocus';
        $ret['assets']['files'][] = 'vps/Vpc/Box/Search/Component.js';

        $ret['placeholder']['searchButton'] = trlVps('Search');
        $ret['placeholder']['clearOnFocus'] = trlVps('Search term');
        $ret['placeholder']['initialResultText'] = trlVps('Please type at least two characters.');

        return $ret;
    }

    public function getTemplateVars()
    {
        $ret = parent::getTemplateVars();
        $ret['ajaxUrl'] = $this->getData()->getChildComponent('_ajax')->url;
        $ret['searchPageUrl'] = $this->_getSearchPageUrl();
        return $ret;
    }

    abstract public function getSearchComponents();
    abstract protected function _getSearchPageUrl();
}
{'fraction_non_alphanumeric': 0.16603915662650603, 'fraction_numerical': 0.0, 'mean_word_length': 3.1003086419753085, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 17, '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': '6859277', 'n_tokens_mistral': 786, 'n_tokens_neox': 783, 'n_words': 139}