function StringFilter::query

Same name in other branches
  1. 8.9.x core/modules/views/src/Plugin/views/filter/StringFilter.php \Drupal\views\Plugin\views\filter\StringFilter::query()
  2. 10 core/modules/views/src/Plugin/views/filter/StringFilter.php \Drupal\views\Plugin\views\filter\StringFilter::query()
  3. 11.x core/modules/views/src/Plugin/views/filter/StringFilter.php \Drupal\views\Plugin\views\filter\StringFilter::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 StringFilter::query()
Combine::query in core/modules/views/src/Plugin/views/filter/Combine.php
Add this filter to the query.

File

core/modules/views/src/Plugin/views/filter/StringFilter.php, line 341

Class

StringFilter
Basic textfield filter to handle string filtering commands.

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);
    }
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.