You are here

public function QueryInterface::abort in Search API 8

Aborts this query.

This will mean that, while the query object otherwise acts normally, it won't be passed to the server and won't return any results.

Parameters

\Drupal\Component\Render\MarkupInterface|string|null $error_message: (optional) A translated error message explaining the reason why the query was aborted.

Return value

$this

1 method overrides QueryInterface::abort()
Query::abort in src/Query/Query.php
Aborts this query.

File

src/Query/QueryInterface.php, line 269

Class

QueryInterface
Represents a search query on a Search API index.

Namespace

Drupal\search_api\Query

Code

public function abort($error_message = NULL);