You are here

function Combine::op_contains in Views (for Drupal 7) 8.3

Overrides String::op_contains

File

lib/Drupal/views/Plugin/views/filter/Combine.php, line 101
Definition of Drupal\views\Plugin\views\filter\Combine.

Class

Combine
Filter handler which allows to search on multiple fields.

Namespace

Drupal\views\Plugin\views\filter

Code

function op_contains($field) {
  $placeholder = $this
    ->placeholder();
  $this->query
    ->add_where_expression($this->options['group'], "{$field} LIKE {$placeholder}", array(
    $placeholder => '%' . db_like($this->value) . '%',
  ));
}