You are here

public function SearchApiFacetapiAdapter::getResultCount in Search API 7

Returns the number of total results found for the current search.

File

contrib/search_api_facetapi/plugins/facetapi/adapter.inc, line 212
Classes used by the Facet API module.

Class

SearchApiFacetapiAdapter
Facet API adapter for the Search API module.

Code

public function getResultCount() {
  $search = $this
    ->getCurrentSearch();

  // Each search is an array with the query as the first element and the results
  // array as the second.
  if (isset($search[1])) {
    return $search[1]['result count'];
  }
  return 0;
}