You are here

function elasticsearch_connector_views_handler_filter_string_autocomplete::query in Elasticsearch Connector 7.2

Same name and namespace in other branches
  1. 7.5 modules/elasticsearch_connector_views/handlers/elasticsearch_connector_views_handler_filter_string_autocomplete.inc \elasticsearch_connector_views_handler_filter_string_autocomplete::query()
  2. 7 modules/elasticsearch_connector_views/handlers/elasticsearch_connector_views_handler_filter_string_autocomplete.inc \elasticsearch_connector_views_handler_filter_string_autocomplete::query()

Add this filter to the query.

Due to the nature of fapi, the value and the operator have an unintended level of indirection. You will find them in $this->operator and $this->value respectively.

Overrides views_handler_filter_string::query

File

modules/elasticsearch_connector_views/handlers/elasticsearch_connector_views_handler_filter_string_autocomplete.inc, line 123
Handle the elasticsearch string fields autocomplete filter using views_autocomplete_filters.

Class

elasticsearch_connector_views_handler_filter_string_autocomplete
@file Handle the elasticsearch string fields autocomplete filter using views_autocomplete_filters.

Code

function query() {
  $this
    ->ensure_my_table();
  $field = $this->real_field;
  $info = $this
    ->operators();
  if (!empty($info[$this->operator]['method'])) {
    $this
      ->{$info[$this->operator]['method']}($field);
  }
}