|
@@ 375-377 (lines=3) @@
|
| 372 |
|
->select(["lvl0.[[{$primaryKey}]] AS lvl0"]) |
| 373 |
|
->from("{$tableName} lvl0") |
| 374 |
|
->where(["lvl0.[[{$this->parentAttribute}]]" => $lastLevelIds]); |
| 375 |
|
if ($this->sortable !== false) { |
| 376 |
|
$query->orderBy(["lvl0.[[{$this->behavior->sortAttribute}]]" => SORT_ASC]); |
| 377 |
|
} |
| 378 |
|
for ($i = 0; $i < $this->childrenJoinLevels && ($depth === null || $i + $depthCur + 1 < $depth); $i++) { |
| 379 |
|
$depthCur++; |
| 380 |
|
$levels++; |
|
@@ 389-391 (lines=3) @@
|
| 386 |
|
"lvl{$j}.[[{$this->parentAttribute}]] = lvl{$i}.[[{$primaryKey}]]", |
| 387 |
|
['is not', "lvl{$i}.[[{$primaryKey}]]", null], |
| 388 |
|
]); |
| 389 |
|
if ($this->sortable !== false) { |
| 390 |
|
$query->addOrderBy(["lvl{$j}.[[{$this->behavior->sortAttribute}]]" => SORT_ASC]); |
| 391 |
|
} |
| 392 |
|
} |
| 393 |
|
if ($this->childrenJoinLevels) { |
| 394 |
|
$columns = []; |