|
@@ 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 |
|
|
|
@@ 395-413 (lines=19) @@
|
| 392 |
|
// filtering[foo|bar] |
| 393 |
|
// $filterAndOperator[0] = 'foo' |
| 394 |
|
// $filterAndOperator[1] = 'bar' |
| 395 |
|
if (isset($filterAndOperator[1])) { |
| 396 |
|
if ('list' == $filterAndOperator[1]) { |
| 397 |
|
$whereCondition = $this->entityAlias.'.'.$fieldName.' '.$operator['meta'].' (:field_'.$fieldName . $salt . ')'; |
| 398 |
|
} else if ('field_eq' == $filterAndOperator[1]) { |
| 399 |
|
$whereCondition = |
| 400 |
|
$this->entityAlias . '.' . $fieldName . ' '. |
| 401 |
|
$operator['meta'] . '' . |
| 402 |
|
$this->entityAlias . '.' . $value |
| 403 |
|
; |
| 404 |
|
//} else { |
| 405 |
|
//throw new \RuntimeException( |
| 406 |
|
//'Oops! Eccezzione' |
| 407 |
|
//); |
| 408 |
|
} else { |
| 409 |
|
$whereCondition = $this->entityAlias.'.'.$fieldName.' '.$operator['meta'].' :field_'.$fieldName . $salt; |
| 410 |
|
} |
| 411 |
|
} else { |
| 412 |
|
$whereCondition = $this->entityAlias.'.'.$fieldName.' = :field_'.$fieldName . $salt; |
| 413 |
|
} |
| 414 |
|
|
| 415 |
|
if ($orCondition['orCondition'] != null) { |
| 416 |
|
$orCondition['orCondition'] .= ' OR ' . $whereCondition; |