You are here

public function QueryHelper::getResults in Search API 8

Retrieves the results data for a search ID.

Parameters

string $search_id: The search ID of the results to retrieve.

Return value

\Drupal\search_api\Query\ResultSetInterface|null The results with the given search ID, if present; NULL otherwise.

Overrides QueryHelperInterface::getResults

File

src/Utility/QueryHelper.php, line 107

Class

QueryHelper
Provides methods for creating search queries and statically caching results.

Namespace

Drupal\search_api\Utility

Code

public function getResults($search_id) {
  return $this->results[$this
    ->getCurrentRequest()][$search_id] ?? NULL;
}