<commit_before><?php
class Vpc_Composite_ImagesEnlarge_Component extends Vpc_Composite_Images_Component
{
    public static function getSettings()
    {
        $ret = parent::getSettings();
        $ret['generators']['child']['component'] = 'Vpc_Basic_ImageEnlarge_Component';
        $ret['componentName'] = trlVps('Gallery');
        $ret['assets']['files'][] = 'vps/Vpc/Composite/ImagesEnlarge/Component.js';
        $ret['assets']['dep'][] = 'ExtCore';
        return $ret;
    }

    public function getTemplateVars()
    {
        $ret = parent::getTemplateVars();
        $images = $this->getData()->getChildComponents(array(
            'generator' => 'child'
        ));
        $ret['smallMaxWidth'] = 0;
        $ret['smallMaxHeight'] = 0;
        foreach ($images as $image) {
            $img = $image->getComponent()->getImageDimensions();
            $ret['smallMaxWidth'] = max($ret['smallMaxWidth'], $img['width']);
            $ret['smallMaxHeight'] = max($ret['smallMaxHeight'], $img['height']);
        }

        return $ret;
    }
}<commit_msg>cache löschen wenn sich ein bild ändern, da die maximal größe sich geändert haben kann<commit_after><?php
class Vpc_Composite_ImagesEnlarge_Component extends Vpc_Composite_Images_Component
{
    public static function getSettings()
    {
        $ret = parent::getSettings();
        $ret['generators']['child']['component'] = 'Vpc_Basic_ImageEnlarge_Component';
        $ret['componentName'] = trlVps('Gallery');
        $ret['assets']['files'][] = 'vps/Vpc/Composite/ImagesEnlarge/Component.js';
        $ret['assets']['dep'][] = 'ExtCore';
        return $ret;
    }

    public function getTemplateVars()
    {
        $ret = parent::getTemplateVars();
        $images = $this->getData()->getChildComponents(array(
            'generator' => 'child'
        ));
        $ret['smallMaxWidth'] = 0;
        $ret['smallMaxHeight'] = 0;
        foreach ($images as $image) {
            $img = $image->getComponent()->getImageDimensions();
            $ret['smallMaxWidth'] = max($ret['smallMaxWidth'], $img['width']);
            $ret['smallMaxHeight'] = max($ret['smallMaxHeight'], $img['height']);
        }

        return $ret;
    }

    public function getCacheVars()
    {
        $ret = parent::getCacheVars();
        $ret[] = $this->_getCacheVars();
        $images = $this->getData()->getChildComponents(array(
            'generator' => 'child'
        ));
        foreach ($images as $image) {
            $ret[] = array(
                'model' => $this->getComponent()->getOwnModel(),
                'id' => $image->dbId,
                'field' => 'component_id'
            );
        }
        return $ret;
    }
}
{'fraction_non_alphanumeric': 0.1706775268419104, 'fraction_numerical': 0.001480932987782303, 'mean_word_length': 2.6464237516869096, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 23, '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': '1677186', 'n_tokens_mistral': 791, 'n_tokens_neox': 789, 'n_words': 135}