|
@@ 384-386 (lines=3) @@
|
| 381 |
|
->select(["lvl0.[[{$primaryKey}]] AS lvl0"]) |
| 382 |
|
->from("{$tableName} lvl0") |
| 383 |
|
->where(["lvl0.[[{$this->parentAttribute}]]" => $lastLevelIds]); |
| 384 |
|
if ($this->sortable !== false) { |
| 385 |
|
$query->orderBy(["lvl0.[[{$this->behavior->sortAttribute}]]" => SORT_ASC]); |
| 386 |
|
} |
| 387 |
|
for ($i = 0; $i < $this->childrenJoinLevels && ($depth === null || $i + $depthCur + 1 < $depth); $i++) { |
| 388 |
|
$depthCur++; |
| 389 |
|
$levels++; |
|
@@ 398-400 (lines=3) @@
|
| 395 |
|
"lvl{$j}.[[{$this->parentAttribute}]] = lvl{$i}.[[{$primaryKey}]]", |
| 396 |
|
['is not', "lvl{$i}.[[{$primaryKey}]]", null], |
| 397 |
|
]); |
| 398 |
|
if ($this->sortable !== false) { |
| 399 |
|
$query->addOrderBy(["lvl{$j}.[[{$this->behavior->sortAttribute}]]" => SORT_ASC]); |
| 400 |
|
} |
| 401 |
|
} |
| 402 |
|
if ($this->childrenJoinLevels) { |
| 403 |
|
$columns = []; |