public function loadPathLocations(Location $location)
    {
        $locationQuery = new LocationQuery([
            'filter' => new Ancestor($location->pathString),
            'sortClauses' => [new Path()],
        ]);

        $searchResult = $this->searchService->findLocations($locationQuery);

        return array_map(function (SearchHit $searchHit) {
            return $searchHit->valueObject;
        }, $searchResult->searchHits);
    }
public function loadPathLocations(Location $location)
    {
        $locationQuery = new LocationQuery([
            'filter' => new Ancestor($location->pathString),
            'sortClauses' => [new Path()],
        ]);

        $searchResult = $this->searchService->findLocations($locationQuery);

        return array_map(function (SearchHit $searchHit) {
            return $searchHit->valueObject;
        }, $searchResult->searchHits);
    }
public function loadPathLocations ( Location $ location ) { $ locationQuery = new LocationQuery ( [ 'filter' => new Ancestor ( $ location -> pathString ) , 'sortClauses' => [ new Path ( ) ] , ] ) ; $ searchResult = $ this -> searchService -> findLocations ( $ locationQuery ) ; return array_map ( function ( SearchHit $ searchHit ) { return $ searchHit -> valueObject ; } , $ searchResult -> searchHits ) ; }
Load path locations.

@param Location $location

@return Location[]
Load path locations .