You are here

public function String::query in Views (for Drupal 7) 8.3

Same name in this branch
  1. 8.3 lib/Drupal/views/Plugin/views/filter/String.php \Drupal\views\Plugin\views\filter\String::query()
  2. 8.3 lib/Drupal/views/Plugin/views/argument/String.php \Drupal\views\Plugin\views\argument\String::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 FilterPluginBase::query

1 method overrides String::query()
Combine::query in lib/Drupal/views/Plugin/views/filter/Combine.php
Add this filter to the query.

File

lib/Drupal/views/Plugin/views/filter/String.php, line 255
Definition of Drupal\views\Plugin\views\filter\String.

Class

String
Basic textfield filter to handle string filtering commands including equality, like, not like, etc.

Namespace

Drupal\views\Plugin\views\filter

Code

public function query() {
  $this
    ->ensureMyTable();
  $field = "{$this->tableAlias}.{$this->realField}";
  $info = $this
    ->operators();
  if (!empty($info[$this->operator]['method'])) {
    $this
      ->{$info[$this->operator]['method']}($field);
  }
}