Exponential 5.x Kernel 7.5.40 Exponential New Stack (Symfony-based) Kernel — PHP Class Reference

Public Member Functions | Protected Attributes | List of all members
eZ\Publish\API\Repository\Values\Content\Query\SortClause\MapLocationDistance Class Reference

Sets sort direction on the MapLocation distance for a content query. More...

Inheritance diagram for eZ\Publish\API\Repository\Values\Content\Query\SortClause\MapLocationDistance:

## Public Member Functions
| __construct ( $typeIdentifier, $fieldIdentifier, $latitude, $longitude, $sortDirection=Query::SORT_ASC)
| Constructs a new MapLocationDistance SortClause on Type $typeIdentifier and Field $fieldIdentifier. More...
| setCustomField ($type, $field, $customField)
| Set a custom field to sort by. More...
| getCustomField ($type, $field)
| Return custom field. More...
Public Member Functions inherited from eZ\Publish\API\Repository\Values\Content\Query\SortClause
| __construct ($sortTarget, $sortDirection, $targetData=null)
| Constructs a new SortClause on $sortTarget in direction $sortDirection. More...

## Protected Attributes
| $customFields = []

## Additional Inherited Members
Public Attributes inherited from eZ\Publish\API\Repository\Values\Content\Query\SortClause
| $direction = Query::SORT_ASC
| $target
| $targetData

## Detailed Description

Sets sort direction on the MapLocation distance for a content query.

Definition at line 17 of file API/Repository/Values/Content/Query/SortClause/MapLocationDistance.php.

## Constructor & Destructor Documentation

## ◆ __construct()

eZ\Publish\API\Repository\Values\Content\Query\SortClause\MapLocationDistance::__construct | ( |  | $typeIdentifier,
|  |  | $fieldIdentifier,
|  |  | $latitude,
|  |  | $longitude,
|  |  | $sortDirection = `Query::SORT_ASC`
| ) |  |

Constructs a new MapLocationDistance SortClause on Type $typeIdentifier and Field $fieldIdentifier.

Parameters

  string | $typeIdentifier | ContentType identifier
  string | $fieldIdentifier | FieldDefinition identifier
  float | $latitude | Latitude of the location that distance is calculated from
  float | $longitude | Longitude of the location that distance is calculated from
  string | $sortDirection |

Definition at line 35 of file API/Repository/Values/Content/Query/SortClause/MapLocationDistance.php.

## Member Function Documentation

## ◆ getCustomField()

eZ\Publish\API\Repository\Values\Content\Query\SortClause\MapLocationDistance::getCustomField | ( |  | $type,
|  |  | $field
| ) |  |

Return custom field.

If no custom field is set, return null

Parameters

  string | $type |
  string | $field |

Returns
  mixed

Implements eZ\Publish\API\Repository\Values\Content\Query\CustomFieldInterface.

Definition at line 78 of file API/Repository/Values/Content/Query/SortClause/MapLocationDistance.php.

## ◆ setCustomField()

eZ\Publish\API\Repository\Values\Content\Query\SortClause\MapLocationDistance::setCustomField | ( |  | $type,
|  |  | $field,
|  |  | $customField
| ) |  |

Set a custom field to sort by.

Set a custom field to sort by for a defined field in a defined type.

Parameters

  string | $type |
  string | $field |
  string | $customField |

Implements eZ\Publish\API\Repository\Values\Content\Query\CustomFieldInterface.

Definition at line 63 of file API/Repository/Values/Content/Query/SortClause/MapLocationDistance.php.

## Member Data Documentation

## ◆ $customFields

eZ\Publish\API\Repository\Values\Content\Query\SortClause\MapLocationDistance::$customFields = []
| protected

Definition at line 24 of file API/Repository/Values/Content/Query/SortClause/MapLocationDistance.php.

The documentation for this class was generated from the following file:

- API/Repository/Values/Content/Query/SortClause/MapLocationDistance.php

Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.