function StringFilter::query
Same name in other branches
- 9 core/modules/views/src/Plugin/views/filter/StringFilter.php \Drupal\views\Plugin\views\filter\StringFilter::query()
- 10 core/modules/views/src/Plugin/views/filter/StringFilter.php \Drupal\views\Plugin\views\filter\StringFilter::query()
- 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 314
Class
- StringFilter
- Basic textfield filter to handle string filtering commands including equality, like, not like, etc.
Namespace
Drupal\views\Plugin\views\filterCode
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.