Sets sort direction on the MapLocation distance for a content query.
Properties¶
$direction
¶
SortClause.php
:
26
Sort direction One of Query::SORT_ASC or Query::SORT_DESC;.
|
|
$target
¶
SortClause.php
:
33
Sort target, high level: section_identifier, attribute_value, etc.
|
|
$targetData
¶
SortClause.php
:
40
Extra target data, required by some sort clauses, field for instance.
|
|
$customFields
¶
MapLocationDistance.php
:
26
Custom fields to sort by instead of the default field.
|
|
Methods¶
__construct()
¶
MapLocationDistance.php
:
37
Constructs a new MapLocationDistance SortClause on Type $typeIdentifier and Field $fieldIdentifier.
|
|
Parameters
Name | Type | Default value | Description |
---|---|---|---|
$typeIdentifier | string | - |
ContentType identifier |
$fieldIdentifier | string | - |
FieldDefinition identifier |
$latitude | float | - |
Latitude of the location that distance is calculated from |
$longitude | float | - |
Longitude of the location that distance is calculated from |
$sortDirection | string | Query::SORT_ASC | - |
getCustomField()
¶
MapLocationDistance.php
:
80
Return custom field.
|
|
If no custom field is set, return null
Parameters
Name | Type | Default value | Description |
---|---|---|---|
$type | string | - | - |
$field | string | - | - |
setCustomField()
¶
MapLocationDistance.php
:
65
Set a custom field to sort by.
|
|
Set a custom field to sort by for a defined field in a defined type.
Parameters
Name | Type | Default value | Description |
---|---|---|---|
$type | string | - | - |
$field | string | - | - |
$customField | string | - | - |