Admin_TranslationController::extendTranslationQuery PHP Метод

extendTranslationQuery() защищенный Метод

protected extendTranslationQuery ( $joins, $list, $tableName, $filters )
    protected function extendTranslationQuery($joins, $list, $tableName, $filters)
    {
        if ($joins) {
            $list->onCreateQuery(function (\Zend_Db_Select $select) use($list, $joins, $tableName, $filters) {
                $db = \Pimcore\Db::get();
                $alreadyJoined = [];
                foreach ($joins as $join) {
                    $fieldname = $join["language"];
                    if ($alreadyJoined[$fieldname]) {
                        continue;
                    }
                    $alreadyJoined[$fieldname] = 1;
                    $select->joinLeft([$fieldname => $tableName], "(" . $fieldname . ".key = " . $tableName . ".key" . " and " . $fieldname . ".language = " . $db->quote($fieldname) . ")", [$fieldname => "text"]);
                }
                $havings = $filters["conditions"];
                if ($havings) {
                    $havings = implode(" AND ", $havings);
                    $select->having($havings);
                }
            });
        }
    }