|
@@ 127-129 (lines=3) @@
|
| 124 |
|
['<', "{$tableName}.[[{$this->leftAttribute}]]", $this->owner->getAttribute($this->leftAttribute)], |
| 125 |
|
['>', "{$tableName}.[[{$this->rightAttribute}]]", $this->owner->getAttribute($this->rightAttribute)], |
| 126 |
|
]; |
| 127 |
|
if ($depth !== null) { |
| 128 |
|
$condition[] = ['>=', "{$tableName}.[[{$this->depthAttribute}]]", $this->owner->getAttribute($this->depthAttribute) - $depth]; |
| 129 |
|
} |
| 130 |
|
|
| 131 |
|
$query = $this->owner->find() |
| 132 |
|
->andWhere($condition) |
|
@@ 183-185 (lines=3) @@
|
| 180 |
|
[$andSelf ? '<=' : '<', "{$tableName}.[[{$attribute}]]", $this->owner->getAttribute($this->rightAttribute)], |
| 181 |
|
]; |
| 182 |
|
|
| 183 |
|
if ($depth !== null) { |
| 184 |
|
$condition[] = ['<=', "{$tableName}.[[{$this->depthAttribute}]]", $this->owner->getAttribute($this->depthAttribute) + $depth]; |
| 185 |
|
} |
| 186 |
|
|
| 187 |
|
$query = $this->owner->find() |
| 188 |
|
->andWhere($condition) |