/** * {@inheritdoc} */ public function getStatement(QueryBuilder $queryBuilder) { $paramName = $this->getFieldName() . $this->getUniqueId(); $values = $this->filterNullValues($this->getValues()); $statement = ''; if (count($values) > 0) { $queryBuilder->setParameter($paramName, $values); $statement = $this->field->getSelect() . ' IN (:' . $paramName . ')'; if (array_search(null, $this->getValues())) { $statement .= ' OR ' . $this->field->getSelect() . ' IS NULL'; } } elseif (array_search(null, $this->getValues())) { // only null in values array $statement .= $paramName . ' IS NULL'; } return $statement; }
/** * {@inheritdoc} */ public function getWhere() { return $this->fieldDescriptor->getSelect(); }