|
@@ 266-281 (lines=16) @@
|
| 263 |
|
if ($this->joins) { |
| 264 |
|
$queryParams['joins'] = $this->joins; |
| 265 |
|
} |
| 266 |
|
if (!empty($this->managerOptions['userGroupFilter'][\Users\User::$cur->group_id]['getRows'])) { |
| 267 |
|
foreach ($this->managerOptions['userGroupFilter'][\Users\User::$cur->group_id]['getRows'] as $colName => $colOptions) { |
| 268 |
|
if (!empty($colOptions['userCol'])) { |
| 269 |
|
$queryParams['where'][] = [$colName, \Model::getColValue(\Users\User::$cur, $colOptions['userCol'])]; |
| 270 |
|
} elseif (isset($colOptions['value'])) { |
| 271 |
|
if (is_array($colOptions['value'])) { |
| 272 |
|
foreach ($colOptions['value'] as $key => $value) { |
| 273 |
|
if ($key === 'userCol') { |
| 274 |
|
$colOptions['value'][$key] = \Model::getColValue(\Users\User::$cur, $value); |
| 275 |
|
} |
| 276 |
|
} |
| 277 |
|
} |
| 278 |
|
$queryParams['where'][] = [$colName, $colOptions['value'], is_array($colOptions['value']) ? 'IN' : '=']; |
| 279 |
|
} |
| 280 |
|
} |
| 281 |
|
} |
| 282 |
|
if (!empty($this->managerOptions['filters'])) { |
| 283 |
|
foreach ($this->managerOptions['filters'] as $col) { |
| 284 |
|
$colInfo = $modelName::getColInfo($col); |
|
@@ 569-584 (lines=16) @@
|
| 566 |
|
if (!empty($params['categoryPath']) && $modelName::$categoryModel) { |
| 567 |
|
$queryParams['where'][] = ['tree_path', $params['categoryPath'] . '%', 'LIKE']; |
| 568 |
|
} |
| 569 |
|
if (!empty($this->managerOptions['userGroupFilter'][\Users\User::$cur->group_id]['getRows'])) { |
| 570 |
|
foreach ($this->managerOptions['userGroupFilter'][\Users\User::$cur->group_id]['getRows'] as $colName => $colOptions) { |
| 571 |
|
if (!empty($colOptions['userCol'])) { |
| 572 |
|
$queryParams['where'][] = [$colName, \Model::getColValue(\Users\User::$cur, $colOptions['userCol'])]; |
| 573 |
|
} elseif (isset($colOptions['value'])) { |
| 574 |
|
if (is_array($colOptions['value'])) { |
| 575 |
|
foreach ($colOptions['value'] as $key => $value) { |
| 576 |
|
if ($key === 'userCol') { |
| 577 |
|
$colOptions['value'][$key] = \Model::getColValue(\Users\User::$cur, $value); |
| 578 |
|
} |
| 579 |
|
} |
| 580 |
|
} |
| 581 |
|
$queryParams['where'][] = [$colName, $colOptions['value'], is_array($colOptions['value']) ? 'IN' : '=']; |
| 582 |
|
} |
| 583 |
|
} |
| 584 |
|
} |
| 585 |
|
$modelName = $this->modelName; |
| 586 |
|
if (!empty($this->managerOptions['filters'])) { |
| 587 |
|
foreach ($this->managerOptions['filters'] as $col) { |