<commit_before><?php
class Vpc_Directories_Category_ShowCategories_Form extends Vps_Form_NonTableForm
{
    public function __construct($name, $class)
    {
        $this->setProperty('class', $class);
        parent::__construct($name);

        $showDirectoryClass = Vpc_Abstract::getSetting($class, 'showDirectoryClass');

        $p = new Vps_Dao_Pool();
        $categories = Vps_Component_Data_Root::getInstance()
                ->getComponentsByClass('Vpc_Directories_Category_Directory_Component');

        // Todo: auf cards umstellen
        $values = array();
        foreach ($categories as $category) {
            $pool = Vpc_Abstract::getSetting($category->componentClass, 'pool');
            $itemDirectory = $category->getComponent()->getItemDirectory();
            if (is_instance_of($itemDirectory->componentClass, $showDirectoryClass)) {
                foreach ($p->fetchAll(array('pool = ?' => $pool)) as $cat) {
                    $values[$itemDirectory->dbId.'#'.$cat->id] = $itemDirectory->getTitle().' - '.$cat->__toString();
                }
            }
        }
        $this->add(new Vps_Form_Field_MultiCheckbox(
                'Vpc_Directories_Category_ShowCategories_Model', trlVps('Categories'))
            )->setValues($values)
            ->setReferences(array(
                'columns' => array('component_id'),
                'refColumns' => array('id')
            ))
            ->setColumnName('category');
    }
}
<commit_msg>bugfix<commit_after><?php
class Vpc_Directories_Category_ShowCategories_Form extends Vps_Form_NonTableForm
{
    public function __construct($name, $class)
    {
        $this->setProperty('class', $class);
        parent::__construct($name);

        $showDirectoryClass = Vpc_Abstract::getSetting($class, 'showDirectoryClass');

        $p = new Vps_Dao_Pool();
        $categories = Vps_Component_Data_Root::getInstance()
                ->getComponentsByClass('Vpc_Directories_Category_Directory_Component');

        // Todo: auf cards umstellen
        $values = array();
        foreach ($categories as $category) {
            $pool = Vpc_Abstract::getSetting($category->componentClass, 'pool');
            $itemDirectory = $category->parent;
            if (is_instance_of($itemDirectory->componentClass, $showDirectoryClass)) {
                foreach ($p->fetchAll(array('pool = ?' => $pool)) as $cat) {
                    $values[$itemDirectory->dbId.'#'.$cat->id] = $itemDirectory->getTitle().' - '.$cat->__toString();
                }
            }
        }
        $this->add(new Vps_Form_Field_MultiCheckbox(
                'Vpc_Directories_Category_ShowCategories_Model', trlVps('Categories'))
            )->setValues($values)
            ->setReferences(array(
                'columns' => array('component_id'),
                'refColumns' => array('id')
            ))
            ->setColumnName('category');
    }
}

{'fraction_non_alphanumeric': 0.14017094017094017, 'fraction_numerical': 0.0, 'mean_word_length': 2.5509708737864076, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 38, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2228493', 'n_tokens_mistral': 762, 'n_tokens_neox': 792, 'n_words': 116}