public function SearchApiHandlerTrait::getQuery in Search API 8
Retrieves the query plugin.
Return value
\Drupal\search_api\Plugin\views\query\SearchApiQuery|null The query plugin, or NULL if there is no query or it is no Search API query.
4 calls to SearchApiHandlerTrait::getQuery()
- SearchApiFulltext::query in src/
Plugin/ views/ filter/ SearchApiFulltext.php - Add this filter to the query.
- SearchApiFulltext::validateExposed in src/
Plugin/ views/ filter/ SearchApiFulltext.php - Validate the exposed handler form
- SearchApiHandlerTrait::getIndex in src/
Plugin/ views/ SearchApiHandlerTrait.php - Returns the active search index.
- SearchApiLanguage::query in src/
Plugin/ views/ filter/ SearchApiLanguage.php - Add this filter to the query.
File
- src/
Plugin/ views/ SearchApiHandlerTrait.php, line 59
Class
- SearchApiHandlerTrait
- Provides a trait to use for Search API Views handlers.
Namespace
Drupal\search_api\Plugin\viewsCode
public function getQuery() {
$query = $this->query ?? $this->view->query ?? NULL;
return $query instanceof SearchApiQuery ? $query : NULL;
}