<commit_before><?php
class Vps_Data_Vpc_Frontend extends Vps_Data_Abstract
{
    private $_componentClass;

    public function __construct($componentClass)
    {
        $this->_componentClass = $componentClass;
    }

    public function load($row)
    {
        $id = $row->component_id.'-'.$row->id;
        $data = Vps_Component_Data_Root::getInstance()->getComponentByDbId(
            $id,
            array('ignoreVisible' => true, 'limit' => 1)
        );
        if (!$data) {
            return "Component with '$id' not found";
        }
        $class = $data->componentClass;
        if (is_instance_of($class, 'Vpc_Abstract')) {

            $process = $data
                ->getRecursiveChildComponents(array(
                        'page' => false,
                        'flags' => array('processInput' => true),
                        'ignoreVisible' => true
                    ));
            if (Vps_Component_Abstract::getFlag($data->componentClass, 'processInput')) {
                $process[] = $data;
            }
            foreach ($process as $i) {
                if (method_exists($i->getComponent(), 'processInput')) {
                    $i->getComponent()->processInput(array());
                }
            }
            return Vps_View_Component::renderComponent($data, true);
        } else if (isset($row->settings)) {
            $settingsModel = new Vps_Model_Field(array(
                'parentModel' => $row->getModel(),
                'fieldName' => 'settings'
            ));
            $f = new $class();
            $f->setProperties($settingsModel->getRowByParentRow($row)->toArray());

            $vars = $f->getTemplateVars(array());

            $view = new Vps_View_Ext();
            $view->item = $vars;
            return $view->render('field.tpl');
        }
    }
}
<commit_msg>Data_Frontend: Im Backend wurde vor processInput() kein preProcessInput() aufgerufen<commit_after><?php
class Vps_Data_Vpc_Frontend extends Vps_Data_Abstract
{
    private $_componentClass;

    public function __construct($componentClass)
    {
        $this->_componentClass = $componentClass;
    }

    public function load($row)
    {
        $id = $row->component_id.'-'.$row->id;
        $data = Vps_Component_Data_Root::getInstance()->getComponentByDbId(
            $id,
            array('ignoreVisible' => true, 'limit' => 1)
        );
        if (!$data) {
            return "Component with '$id' not found";
        }
        $class = $data->componentClass;
        if (is_instance_of($class, 'Vpc_Abstract')) {

            $process = $data
                ->getRecursiveChildComponents(array(
                        'page' => false,
                        'flags' => array('processInput' => true),
                        'ignoreVisible' => true
                    ));
            if (Vps_Component_Abstract::getFlag($data->componentClass, 'processInput')) {
                $process[] = $data;
            }
            foreach ($process as $i) {
                if (method_exists($i->getComponent(), 'preProcessInput')) {
                    $i->getComponent()->preProcessInput(array());
                }
            }
            foreach ($process as $i) {
                if (method_exists($i->getComponent(), 'processInput')) {
                    $i->getComponent()->processInput(array());
                }
            }
            return Vps_View_Component::renderComponent($data, true);
        } else if (isset($row->settings)) {
            $settingsModel = new Vps_Model_Field(array(
                'parentModel' => $row->getModel(),
                'fieldName' => 'settings'
            ));
            $f = new $class();
            $f->setProperties($settingsModel->getRowByParentRow($row)->toArray());

            $vars = $f->getTemplateVars(array());

            $view = new Vps_View_Ext();
            $view->item = $vars;
            return $view->render('field.tpl');
        }
    }
}

{'fraction_non_alphanumeric': 0.14203117144293614, 'fraction_numerical': 0.0005027652086475615, 'mean_word_length': 1.751728907330567, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 58, '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': '5660462', 'n_tokens_mistral': 1085, 'n_tokens_neox': 1057, 'n_words': 188}