eZ\Publish\Core\Pagination\Pagerfanta\LocationSearchHitAdapter::getNbResults PHP Method

getNbResults() public method

Returns the number of results.
public getNbResults ( ) : integer
return integer The number of results.
    public function getNbResults()
    {
        if (isset($this->nbResults)) {
            return $this->nbResults;
        }
        $countQuery = clone $this->query;
        $countQuery->limit = 0;
        return $this->nbResults = $this->searchService->findLocations($countQuery)->totalCount;
    }