eZ\Publish\Core\Search\Elasticsearch\Content\Handler::findLocations PHP Method

findLocations() public method

Finds Locations for the given $query.
public findLocations ( eZ\Publish\API\Repository\Values\Content\LocationQuery $query, array $languageFilter = [] ) : eZ\Publish\API\Repository\Values\Content\Search\SearchResult
$query eZ\Publish\API\Repository\Values\Content\LocationQuery
$languageFilter array - a map of language related filters specifying languages query will be performed on. Also used to define which field languages are loaded for the returned content. Currently supports: array("languages" => array(,..), "useAlwaysAvailable" => bool) useAlwaysAvailable defaults to true to avoid exceptions on missing translations
return eZ\Publish\API\Repository\Values\Content\Search\SearchResult
    public function findLocations(LocationQuery $query, array $languageFilter = array())
    {
        $query->filter = $query->filter ?: new Criterion\MatchAll();
        $query->query = $query->query ?: new Criterion\MatchAll();
        $data = $this->locationGateway->find($query, $this->locationDocumentTypeIdentifier);
        return $this->extractor->extract($data);
    }