protected function QueryHelper::getCurrentRequest in Search API 8
Retrieves the current request.
If there is no current request, instead of returning NULL this will instead return a unique object to be used in lieu of a NULL key.
Return value
\Symfony\Component\HttpFoundation\Request|object The current request, if present; or this object's representation of the NULL key.
1 call to QueryHelper::getCurrentRequest()
- QueryHelper::addResults in src/
Utility/ QueryHelper.php - Adds a result set to the cache.
File
- src/
Utility/ QueryHelper.php, line 137
Class
- QueryHelper
- Provides methods for creating search queries and statically caching results.
Namespace
Drupal\search_api\UtilityCode
protected function getCurrentRequest() {
return $this->requestStack
->getCurrentRequest() ?: $this->null;
}