@@ 249-267 (lines=19) @@ | ||
246 | // filtering[foo|bar] |
|
247 | // $filterAndOperator[0] = 'foo' |
|
248 | // $filterAndOperator[1] = 'bar' |
|
249 | if (isset($filterAndOperator[1])) { |
|
250 | if ('list' == $filterAndOperator[1]) { |
|
251 | $whereCondition = $this->entityAlias.'.'.$fieldName.' '.$operator['meta'].' (:field_'.$fieldName . $salt . ')'; |
|
252 | } else if ('field_eq' == $filterAndOperator[1]) { |
|
253 | $whereCondition = |
|
254 | $this->entityAlias . '.' . $fieldName . ' '. |
|
255 | $operator['meta'] . '' . |
|
256 | $this->entityAlias . '.' . $value |
|
257 | ; |
|
258 | //} else { |
|
259 | //throw new \RuntimeException( |
|
260 | //'Oops! Eccezzione' |
|
261 | //); |
|
262 | } else { |
|
263 | $whereCondition = $this->entityAlias.'.'.$fieldName.' '.$operator['meta'].' :field_'.$fieldName . $salt; |
|
264 | } |
|
265 | } else { |
|
266 | $whereCondition = $this->entityAlias.'.'.$fieldName.' = :field_'.$fieldName . $salt; |
|
267 | } |
|
268 | ||
269 | $this->qBuilder->andWhere($whereCondition); |
|
270 | ||
@@ 363-381 (lines=19) @@ | ||
360 | // filtering[foo|bar] |
|
361 | // $filterAndOperator[0] = 'foo' |
|
362 | // $filterAndOperator[1] = 'bar' |
|
363 | if (isset($filterAndOperator[1])) { |
|
364 | if ('list' == $filterAndOperator[1]) { |
|
365 | $whereCondition = $this->entityAlias.'.'.$fieldName.' '.$operator['meta'].' (:field_'.$fieldName . $salt . ')'; |
|
366 | } else if ('field_eq' == $filterAndOperator[1]) { |
|
367 | $whereCondition = |
|
368 | $this->entityAlias . '.' . $fieldName . ' '. |
|
369 | $operator['meta'] . '' . |
|
370 | $this->entityAlias . '.' . $value |
|
371 | ; |
|
372 | //} else { |
|
373 | //throw new \RuntimeException( |
|
374 | //'Oops! Eccezzione' |
|
375 | //); |
|
376 | } else { |
|
377 | $whereCondition = $this->entityAlias.'.'.$fieldName.' '.$operator['meta'].' :field_'.$fieldName . $salt; |
|
378 | } |
|
379 | } else { |
|
380 | $whereCondition = $this->entityAlias.'.'.$fieldName.' = :field_'.$fieldName . $salt; |
|
381 | } |
|
382 | ||
383 | if ($orCondition['orCondition'] != null) { |
|
384 | $orCondition['orCondition'] .= ' OR ' . $whereCondition; |