@@ 285-303 (lines=19) @@ | ||
282 | // filtering[foo|bar] |
|
283 | // $filterAndOperator[0] = 'foo' |
|
284 | // $filterAndOperator[1] = 'bar' |
|
285 | if (isset($filterAndOperator[1])) { |
|
286 | if ('list' == $filterAndOperator[1]) { |
|
287 | $whereCondition = $this->entityAlias.'.'.$fieldName.' '.$operator['meta'].' (:field_'.$fieldName . $salt . ')'; |
|
288 | } else if ('field_eq' == $filterAndOperator[1]) { |
|
289 | $whereCondition = |
|
290 | $this->entityAlias . '.' . $fieldName . ' '. |
|
291 | $operator['meta'] . '' . |
|
292 | $this->entityAlias . '.' . $value |
|
293 | ; |
|
294 | //} else { |
|
295 | //throw new \RuntimeException( |
|
296 | //'Oops! Eccezzione' |
|
297 | //); |
|
298 | } else { |
|
299 | $whereCondition = $this->entityAlias.'.'.$fieldName.' '.$operator['meta'].' :field_'.$fieldName . $salt; |
|
300 | } |
|
301 | } else { |
|
302 | $whereCondition = $this->entityAlias.'.'.$fieldName.' = :field_'.$fieldName . $salt; |
|
303 | } |
|
304 | ||
305 | $this->qBuilder->andWhere($whereCondition); |
|
306 | ||
@@ 399-417 (lines=19) @@ | ||
396 | // filtering[foo|bar] |
|
397 | // $filterAndOperator[0] = 'foo' |
|
398 | // $filterAndOperator[1] = 'bar' |
|
399 | if (isset($filterAndOperator[1])) { |
|
400 | if ('list' == $filterAndOperator[1]) { |
|
401 | $whereCondition = $this->entityAlias.'.'.$fieldName.' '.$operator['meta'].' (:field_'.$fieldName . $salt . ')'; |
|
402 | } else if ('field_eq' == $filterAndOperator[1]) { |
|
403 | $whereCondition = |
|
404 | $this->entityAlias . '.' . $fieldName . ' '. |
|
405 | $operator['meta'] . '' . |
|
406 | $this->entityAlias . '.' . $value |
|
407 | ; |
|
408 | //} else { |
|
409 | //throw new \RuntimeException( |
|
410 | //'Oops! Eccezzione' |
|
411 | //); |
|
412 | } else { |
|
413 | $whereCondition = $this->entityAlias.'.'.$fieldName.' '.$operator['meta'].' :field_'.$fieldName . $salt; |
|
414 | } |
|
415 | } else { |
|
416 | $whereCondition = $this->entityAlias.'.'.$fieldName.' = :field_'.$fieldName . $salt; |
|
417 | } |
|
418 | ||
419 | if ($orCondition['orCondition'] != null) { |
|
420 | $orCondition['orCondition'] .= ' OR ' . $whereCondition; |