public function SearchApiQuery::abort in Search API 8
Aborts this search query.
Used by handlers to flag a fatal error which shouldn't be displayed but still lead to the view returning empty and the search not being executed.
Parameters
\Drupal\Component\Render\MarkupInterface|string|null $msg: Optionally, a translated, unescaped error message to display.
4 calls to SearchApiQuery::abort()
- SearchApiQuery::addWhere in src/
Plugin/ views/ query/ SearchApiQuery.php - Adds a simple condition to the query.
- SearchApiQuery::execute in src/
Plugin/ views/ query/ SearchApiQuery.php - Executes the query and fills the associated view object with according values.
- SearchApiQuery::init in src/
Plugin/ views/ query/ SearchApiQuery.php - Constructor; Create the basic query object and fill with default values.
- SearchApiQuery::transformDbCondition in src/
Plugin/ views/ query/ SearchApiQuery.php - Transforms a database condition to an equivalent search filter.
File
- src/
Plugin/ views/ query/ SearchApiQuery.php, line 617
Class
- SearchApiQuery
- Defines a Views query class for searching on Search API indexes.
Namespace
Drupal\search_api\Plugin\views\queryCode
public function abort($msg = NULL) {
if ($msg) {
$this->errors[] = $msg;
}
$this->abort = TRUE;
if (isset($this->query)) {
$this->query
->abort($msg);
}
}