You are here

public function name_handler_filter_name_fulltext::query in Name Field 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

includes/name_handler_filter_name_fulltext.inc, line 80

Class

name_handler_filter_name_fulltext
Field handler to provide simple renderer that allows linking to a entity.

Code

public function query() {
  $name_table = $this
    ->ensure_my_table();
  $field = "{$this->table_alias}.{$this->real_field}";
  $fulltext_field = "LOWER(CONCAT(' ', COALESCE({$field}_title, ''), ' ', COALESCE({$field}_given, ''), ' ', COALESCE({$field}_middle, ''), ' ', COALESCE({$field}_family, ''), ' ', COALESCE({$field}_generational, ''), ' ', COALESCE({$field}_credentials, '')))";
  $info = $this
    ->operators();
  if (!empty($info[$this->operator]['method'])) {
    $this
      ->{$info[$this->operator]['method']}($fulltext_field);
  }
}