Skip to content

Depth Sort Clause

The Location\Depth Sort Clause sorts search results by the depth of the Location in the Content tree.

Arguments

  • sortDirection (optional) - Query or LocationQuery constant, either Query::SORT_ASC or Query::SORT_DESC.

Example

1
2
$query = new LocationQuery();
$query->sortClauses = [new SortClause\Depth()];