public function getPlaceListSorted(Location $location, $latitude, $longitude, $contentTypes, $maxDist = null, $sortClauses = array(), $languages = array())
    {
        if ($maxDist === null) {
            $maxDist = $this->placeListMaxDist;
        }

        $query = new Query();
        $query->filter = new Criterion\LogicalAnd(
            array(
                new Criterion\ContentTypeIdentifier($contentTypes),
                new Criterion\Subtree($location->pathString),
                new Criterion\LanguageCode($languages),
                new Criterion\MapLocationDistance(
                    'location',
                    Criterion\Operator::BETWEEN,
                    array(
                        $this->placeListMinDist,
                        $maxDist,
                    ),
                    $latitude,
                    $longitude
                ),
            )
        );
        $query->sortClauses = $sortClauses;
        $query->performCount = false;

        $searchResults = $this->searchService->findContentInfo($query);

        return $this->searchHelper->buildListFromSearchResult($searchResults);
    }
public function getPlaceListSorted(Location $location, $latitude, $longitude, $contentTypes, $maxDist = null, $sortClauses = array(), $languages = array())
    {
        if ($maxDist === null) {
            $maxDist = $this->placeListMaxDist;
        }

        $query = new Query();
        $query->filter = new Criterion\LogicalAnd(
            array(
                new Criterion\ContentTypeIdentifier($contentTypes),
                new Criterion\Subtree($location->pathString),
                new Criterion\LanguageCode($languages),
                new Criterion\MapLocationDistance(
                    'location',
                    Criterion\Operator::BETWEEN,
                    array(
                        $this->placeListMinDist,
                        $maxDist,
                    ),
                    $latitude,
                    $longitude
                ),
            )
        );
        $query->sortClauses = $sortClauses;
        $query->performCount = false;

        $searchResults = $this->searchService->findContentInfo($query);

        return $this->searchHelper->buildListFromSearchResult($searchResults);
    }
public function getPlaceListSorted ( Location $ location , $ latitude , $ longitude , $ contentTypes , $ maxDist = null , $ sortClauses = array ( ) , $ languages = array ( ) ) { if ( $ maxDist === null ) { $ maxDist = $ this -> placeListMaxDist ; } $ query = new Query ( ) ; $ query -> filter = new Criterion \ LogicalAnd ( array ( new Criterion \ ContentTypeIdentifier ( $ contentTypes ) , new Criterion \ Subtree ( $ location -> pathString ) , new Criterion \ LanguageCode ( $ languages ) , new Criterion \ MapLocationDistance ( 'location' , Criterion \ Operator :: BETWEEN , array ( $ this -> placeListMinDist , $ maxDist , ) , $ latitude , $ longitude ) , ) ) ; $ query -> sortClauses = $ sortClauses ; $ query -> performCount = false ; $ searchResults = $ this -> searchService -> findContentInfo ( $ query ) ; return $ this -> searchHelper -> buildListFromSearchResult ( $ searchResults ) ; }
Returns all places contained in a place_list that are located between the range defined in
the default configuration. A sort clause array can be provided in order to sort the results.

@param \eZ\Publish\API\Repository\Values\Content\Location $location of a place_list
@param float $latitude
@param float $longitude
@param string|string[] $contentTypes to be retrieved
@param int $maxDist Maximum distance for the search in km
@param array $sortClauses
@param string|string[] $languages to be retrieved

@return \eZ\Publish\API\Repository\Values\Content\Content[]
Returns all places contained in a place_list that are located between the range defined in the default configuration . A sort clause array can be provided in order to sort the results .