src/Sulu/Component/Rest/Listing/ListQueryBuilder.php
private function getOrderBy($prefix)
    {
        $result = '';
        // If sorting is defined
        if (null != $this->sorting && count($this->sorting) > 0) {
            $orderBy = '';
            // TODO OrderBy relations translations_value
            foreach ($this->sorting as $col => $dir) {
                if (strlen($orderBy) > 0) {
                    $orderBy .= ', ';
                }
                $orderBy .= $prefix . '.' . $col . ' ' . $dir;
            }
            $result .= '
                ORDER BY ' . $orderBy;
        }

        return $result;
    }
private function getOrderBy($prefix)
    {
        $result = '';
        // If sorting is defined
        if (null != $this->sorting && count($this->sorting) > 0) {
            $orderBy = '';
            // TODO OrderBy relations translations_value
            foreach ($this->sorting as $col => $dir) {
                if (strlen($orderBy) > 0) {
                    $orderBy .= ', ';
                }
                $orderBy .= $prefix . '.' . $col . ' ' . $dir;
            }
            $result .= '
                ORDER BY ' . $orderBy;
        }

        return $result;
    }
private function getOrderBy ( $ prefix ) { $ result = '' ; // If sorting is defined if ( null != $ this -> sorting && count ( $ this -> sorting ) > 0 ) { $ orderBy = '' ; // TODO OrderBy relations translations_value foreach ( $ this -> sorting as $ col => $ dir ) { if ( strlen ( $ orderBy ) > 0 ) { $ orderBy .= ', ' ; } $ orderBy .= $ prefix . '.' . $ col . ' ' . $ dir ; } $ result .= '
                ORDER BY ' . $ orderBy ; } return $ result ; }
Get DQL for Sorting.

@param string $prefix

@return string
Get DQL for Sorting .