protected function StringFilter::opEmpty in Zircon Profile 8.0
Same name and namespace in other branches
- 8 core/modules/views/src/Plugin/views/filter/StringFilter.php \Drupal\views\Plugin\views\filter\StringFilter::opEmpty()
1 method overrides StringFilter::opEmpty()
- Combine::opEmpty in core/
modules/ views/ src/ Plugin/ views/ filter/ Combine.php
File
- core/
modules/ views/ src/ Plugin/ views/ filter/ StringFilter.php, line 343 - Contains \Drupal\views\Plugin\views\filter\StringFilter.
Class
- StringFilter
- Basic textfield filter to handle string filtering commands including equality, like, not like, etc.
Namespace
Drupal\views\Plugin\views\filterCode
protected function opEmpty($field) {
if ($this->operator == 'empty') {
$operator = "IS NULL";
}
else {
$operator = "IS NOT NULL";
}
$this->query
->addWhere($this->options['group'], $field, NULL, $operator);
}