Class

eZ\Publish\API\Repository\Values\Content\Query\SortClause

abstract class SortClause

This class is the base for SortClause classes, used to set sorting of content queries.

Properties

string $direction Sort direction One of Query::SORTASC or Query::SORTDESC;.
string $target Sort target, high level: sectionidentifier, attributevalue, etc.
Target $targetData Extra target data, required by some sort clauses, field for instance.

Methods

__construct(string $sortTarget, string $sortDirection, string $targetData = null)

Constructs a new SortClause on $sortTarget in direction $sortDirection.

Details

at line 50
public __construct(string $sortTarget, string $sortDirection, string $targetData = null)

Constructs a new SortClause on $sortTarget in direction $sortDirection.

Parameters

string $sortTarget
string $sortDirection one of Query::SORTASC or Query::SORTDESC
string $targetData Extra target data, used by some clauses (field for instance)

Exceptions

InvalidArgumentException if the given sort order isn't one of Query::SORTASC or Query::SORTDESC