You are here

public function ElasticsearchViewsQuery::abort in Elasticsearch Connector 8.2

Same name and namespace in other branches
  1. 8.7 modules/elasticsearch_connector_views/src/Plugin/views/query/ElasticsearchViewsQuery.php \Drupal\elasticsearch_connector_views\Plugin\views\query\ElasticsearchViewsQuery::abort()
  2. 8.5 modules/elasticsearch_connector_views/src/Plugin/views/query/ElasticsearchViewsQuery.php \Drupal\elasticsearch_connector_views\Plugin\views\query\ElasticsearchViewsQuery::abort()
  3. 8.6 modules/elasticsearch_connector_views/src/Plugin/views/query/ElasticsearchViewsQuery.php \Drupal\elasticsearch_connector_views\Plugin\views\query\ElasticsearchViewsQuery::abort()

Aborts this search query.

Used by handlers to flag a fatal error which should not be displayed but still lead to the view returning empty and the search not being executed.

Parameters

string|null $msg: Optionally, a translated, unescaped error message to display.

1 call to ElasticsearchViewsQuery::abort()
ElasticsearchViewsQuery::init in modules/elasticsearch_connector_views/src/Plugin/views/query/ElasticsearchViewsQuery.php
Initialize the plugin.

File

modules/elasticsearch_connector_views/src/Plugin/views/query/ElasticsearchViewsQuery.php, line 491

Class

ElasticsearchViewsQuery
Defines a Views query class for searching on Search API indexes.

Namespace

Drupal\elasticsearch_connector_views\Plugin\views\query

Code

public function abort($msg = NULL) {
  if ($msg) {
    $this->errors[] = $msg;
  }
  $this->abort = TRUE;
}