protected function ProximityFilter::opEmpty in Geolocation Field 8
Same name and namespace in other branches
- 8.3 src/Plugin/views/filter/ProximityFilter.php \Drupal\geolocation\Plugin\views\filter\ProximityFilter::opEmpty()
- 8.2 src/Plugin/views/filter/ProximityFilter.php \Drupal\geolocation\Plugin\views\filter\ProximityFilter::opEmpty()
Overrides NumericFilter::opEmpty
File
- src/
Plugin/ views/ filter/ ProximityFilter.php, line 616
Class
- ProximityFilter
- Filter handler for search keywords.
Namespace
Drupal\geolocation\Plugin\views\filterCode
protected function opEmpty($expression) {
/** @var \Drupal\views\Plugin\views\query\Sql $query */
$query = $this->query;
if ($this->operator == 'empty') {
$operator = "IS NULL";
}
else {
$operator = "IS NOT NULL";
}
$query
->addWhereExpression($this->options['group'], $expression . ' ' . $operator);
}