Sets sort direction on the MapLocation distance for a content query.
Properties¶
$direction
¶
Sort direction One of Query::SORT_ASC or Query::SORT_DESC;.
|
|
|
$target
¶
Sort target, high level: section_identifier, attribute_value, etc.
|
|
|
$targetData
¶
Extra target data, required by some sort clauses, field for instance.
|
|
|
$customFields
¶
Custom fields to sort by instead of the default field.
|
|
|
Methods¶
__construct()
¶
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()
¶
Return custom field.
|
|
|
If no custom field is set, return null
Parameters
| Name | Type | Default value | Description |
|---|---|---|---|
| $type | string | - | - |
| $field | string | - | - |
Return values
string|null
If no custom field is set, return null
setCustomField()
¶
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 | - | - |