Skip to content

Visibility Sort Clause

The Location\Visibility Sort Clause sorts search results by whether the Location is visible or not.

Locations that are not visible are ranked as higher values (e.g. with ascending order they will be returned last).

Arguments

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

Example

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