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
public function query() {
$this
->ensureMyTable();
$field = "{$this->tableAlias}.{$this->realField}";
if (empty($this->value)) {
if ($this->accept_null) {
$or = db_or()
->condition($field, 0, '=')
->condition($field, NULL, 'IS NULL');
$this->query
->add_where($this->options['group'], $or);
}
else {
$this->query
->add_where($this->options['group'], $field, 0, '=');
}
}
else {
if (!empty($this->definition['use_equal'])) {
$this->query
->add_where($this->options['group'], $field, 1, '=');
}
else {
$this->query
->add_where($this->options['group'], $field, 0, '<>');
}
}
}