Pimcore\Model\Translation\AbstractTranslation\Listing\Dao::load PHP Method

load() public method

public load ( ) : array
return array
    public function load()
    {
        $allTranslations = $this->getAllTranslations();
        $translations = [];
        $this->model->setGroupBy(static::getTableName() . ".key", false);
        $select = $this->db->select();
        $select->from([static::getTableName()], static::getTableName() . ".key");
        $this->addConditions($select);
        $this->addGroupBy($select);
        $this->addOrder($select);
        $this->addLimit($select);
        if ($this->onCreateQueryCallback) {
            $closure = $this->onCreateQueryCallback;
            $closure($select);
        }
        $translationsData = $this->db->fetchAll($select, $this->model->getConditionVariables());
        foreach ($translationsData as $t) {
            $translations[] = $allTranslations[$t["key"]];
        }
        $this->model->setTranslations($translations);
        return $translations;
    }