namespace Drupal\views;
+use Drupal\Core\Database\Query\Condition;
use Drupal\Core\Form\FormStateInterface;
use Drupal\views\Plugin\views\HandlerBase;
$options['group'] = 0;
}
- // add_condition determines whether a single expression is enough(FALSE) or the
- // conditions should be added via an db_or()/db_and() (TRUE).
+ // If $add_condition is set to FALSE, a single expression is enough. If it
+ // is set to TRUE, conditions will be added.
$add_condition = TRUE;
if ($operator == 'not') {
$value = NULL;
if ($add_condition) {
$field = $this->handler->realField;
- $clause = $operator == 'or' ? db_or() : db_and();
+ $clause = $operator == 'or' ? new Condition('OR') : new Condition('AND');
foreach ($this->handler->tableAliases as $value => $alias) {
$clause->condition("$alias.$field", $value);
}