<commit_before><?php
class Vpc_Box_InheritContent_Trl_Component extends Vpc_Chained_Trl_Component
{
    public static function getSettings($masterComponentClass)
    {
        $ret = parent::getSettings($masterComponentClass);
        $ret['viewCache'] = false;
        $ret['ownModel'] = 'Vps_Component_FieldModel';

        $childConfig = Vpc_Admin::getInstance($ret['generators']['child']['component']['child'])->getExtConfig();
        if (array_keys($childConfig) == array('form')) {
            $ret['hasVisible'] = true;
            $ret['editComponents'] = array();
        } else {
            $ret['hasVisible'] = false;
            $ret['editComponents'] = array('child');
        }

        $ret['extConfig'] = 'Vpc_Box_InheritContent_Trl_ExtConfig';

        return $ret;
    }

    public function getTemplateVars()
    {
        $ret = Vpc_Abstract::getTemplateVars();
        $ret['linkTemplate'] = self::getTemplateFile($this->getData()->chained->componentClass);
        $ret['child'] = $this->_getContentChild();
        return $ret;
    }

    private function _getContentChild()
    {
        $model = $this->getOwnModel();
        $masterChild = $this->getData()->chained->getComponent()->getContentChild();
        $c = Vpc_Chained_Trl_Component::getChainedByMaster($masterChild, $this->getData());
        $page = $this->getData();
        while($c && (!$c->hasContent() || ($this->_getSetting('hasVisible') && !$c->parent->getComponent()->getRow()->visible))) {
            while ($page && !$page->inherits) {
                $page = $page->parent;
                if ($page instanceof Vps_Component_Data_Root) break;
            }
            if (!isset($page->chained)) {
                $c = null;
                break;
            }
            $masterChild = $page->chained->getChildComponent('-'.$this->getData()->id)
                    ->getChildComponent(array('generator' => 'child'));
            $c = Vpc_Chained_Trl_Component::getChainedByMaster($masterChild, $this->getData());
            if ($page instanceof Vps_Component_Data_Root) break;
            $page = $page->parent;
        }
        return $c;
    }

    public function getExportData()
    {
        return $this->_getContentChild()->getComponent()->getExportData();
    }
}
<commit_msg>Helfen tuts, warum genau auch immer<commit_after><?php
class Vpc_Box_InheritContent_Trl_Component extends Vpc_Chained_Trl_Component
{
    public static function getSettings($masterComponentClass)
    {
        $ret = parent::getSettings($masterComponentClass);
        $ret['viewCache'] = false;
        $ret['ownModel'] = 'Vps_Component_FieldModel';

        $childConfig = Vpc_Admin::getInstance($ret['generators']['child']['component']['child'])->getExtConfig();
        if (array_keys($childConfig) == array('form')) {
            $ret['hasVisible'] = true;
            $ret['editComponents'] = array();
        } else {
            $ret['hasVisible'] = false;
            $ret['editComponents'] = array('child');
        }

        $ret['extConfig'] = 'Vpc_Box_InheritContent_Trl_ExtConfig';

        return $ret;
    }

    public function getTemplateVars()
    {
        $ret = Vpc_Abstract::getTemplateVars();
        $ret['linkTemplate'] = self::getTemplateFile($this->getData()->chained->componentClass);
        $ret['child'] = $this->_getContentChild();
        return $ret;
    }

    private function _getContentChild()
    {
        $model = $this->getOwnModel();
        $masterChild = $this->getData()->chained->getComponent()->getContentChild();
        $c = Vpc_Chained_Trl_Component::getChainedByMaster($masterChild, $this->getData());
        $page = $this->getData();
        while(
            $c && (
                !$c->hasContent() ||
                ($this->_getSetting('hasVisible') && $c->parent->getComponent()->getRow() && !$c->parent->getComponent()->getRow()->visible)
            )
        ) {
            while ($page && !$page->inherits) {
                $page = $page->parent;
                if ($page instanceof Vps_Component_Data_Root) break;
            }
            if (!isset($page->chained)) {
                $c = null;
                break;
            }
            $masterChild = $page->chained->getChildComponent('-'.$this->getData()->id)
                    ->getChildComponent(array('generator' => 'child'));
            $c = Vpc_Chained_Trl_Component::getChainedByMaster($masterChild, $this->getData());
            if ($page instanceof Vps_Component_Data_Root) break;
            $page = $page->parent;
        }
        return $c;
    }

    public function getExportData()
    {
        return $this->_getContentChild()->getComponent()->getExportData();
    }
}

{'fraction_non_alphanumeric': 0.16213921901528014, 'fraction_numerical': 0.0, 'mean_word_length': 2.540946656649136, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 70, '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': '4427199', 'n_tokens_mistral': 1343, 'n_tokens_neox': 1339, 'n_words': 199}