eZ\Publish\Core\Persistence\Doctrine\SelectDoctrineQuery::orderBy PHP Метод

orderBy() публичный Метод

You can call orderBy multiple times. Each call will add a column to order by. Example: $q->select( '*' )->from( 'table' ) ->orderBy( 'id' );
public orderBy ( string $column, string $type = self::ASC ) : eZ\Publish\Core\Persistence\Database\SelectQuery
$column string a column name in the result set
$type string if the column should be sorted ascending or descending. you can specify this using \eZ\Publish\Core\Persistence\Database\SelectQuery::ASC or \eZ\Publish\Core\Persistence\Database\SelectQuery::DESC
Результат eZ\Publish\Core\Persistence\Database\SelectQuery a pointer to $this
    public function orderBy($column, $type = self::ASC)
    {
        if ($type !== self::ASC && $type !== self::DESC) {
            throw new QueryException('Invalid value for type of order by orientation: ' . $type);
        }
        $this->parts['orderBy'][] = $column . ' ' . $type;
        return $this;
    }