<commit_before><?php
class Vps_Component_View_Helper_Master extends Vps_Component_View_Renderer
{
    public function master(Vps_Component_Data $component)
    {
        $renderer = $this->_getRenderer();
        $config = array();
        $type = null;
        $value = null;
        $plugins = array();

        if ($renderer instanceof Vps_Component_Renderer_Mail) {
            //TODO passt das so?
            $type = 'mail';
            $config = array(
                'type' => $renderer->getRenderFormat(),
                'recipient' => $renderer->getRecipient()
            );
        } else {
            $type = 'master';
        }
        return $this->_getRenderPlaceholder($component->componentId, $config, $value, $type, $plugins);
    }

    public function render($componentId, $config)
    {
        $component = $this->_getComponentById($componentId);

        $componentWithMaster = array();
        $componentWithMaster[] = array(
            'type' => 'component',
            'data' => $component
        );
        $c = $component;
        while ($c) {
            if (Vpc_Abstract::getTemplateFile($c->componentClass, 'Master')) {
                $componentWithMaster[] = array(
                    'type' => 'master',
                    'data' => $c
                );
            }
            $c = $c->parent;
        }
        $helper = new Vps_Component_View_Helper_ComponentWithMaster();
        $helper->setRenderer($this->_getRenderer());
        return $helper->componentWithMaster($componentWithMaster);
    }
}<commit_msg>mail spezifisches zeug entfernt, wird fuer mail nicht verwendet<commit_after><?php
class Vps_Component_View_Helper_Master extends Vps_Component_View_Renderer
{
    public function master(Vps_Component_Data $component)
    {
        return $this->_getRenderPlaceholder($component->componentId, array(), null, 'master', array());
    }

    public function render($componentId, $config)
    {
        $component = $this->_getComponentById($componentId);

        $componentWithMaster = array();
        $componentWithMaster[] = array(
            'type' => 'component',
            'data' => $component
        );
        $c = $component;
        while ($c) {
            if (Vpc_Abstract::getTemplateFile($c->componentClass, 'Master')) {
                $componentWithMaster[] = array(
                    'type' => 'master',
                    'data' => $c
                );
            }
            $c = $c->parent;
        }
        $helper = new Vps_Component_View_Helper_ComponentWithMaster();
        $helper->setRenderer($this->_getRenderer());
        return $helper->componentWithMaster($componentWithMaster);
    }
}
{'fraction_non_alphanumeric': 0.1305317962067683, 'fraction_numerical': 0.0, 'mean_word_length': 2.1026528258362167, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 32, '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': '6942529', 'n_tokens_mistral': 725, 'n_tokens_neox': 714, 'n_words': 137}