You are here

function views_extra_handlers_handler_filter_field_config_instance_data_widget::query in Extra Views Handlers 7

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::query

File

views/handlers/views_extra_handlers_handler_filter_field_config_instance_data_widget.inc, line 26
Views filter handler for the views_system module.

Class

views_extra_handlers_handler_filter_field_config_instance_data_widget
@file Views filter handler for the views_system module.

Code

function query() {
  $this
    ->ensure_my_table();
  $field = "{$this->table_alias}.{$this->real_field}";
  $operator = 'LIKE';
  $text_value = $this->value;
  $text_len = strlen($text_value);
  $this->query
    ->add_where($this->options['group'], $field, '%' . db_like('s:4:"type";s:' . $text_len . ':"' . $text_value . '";') . '%', $operator);
}