|
@@ 97-99 (lines=3) @@
|
| 94 |
|
['<', "{$tableName}.[[{$this->leftAttribute}]]", $this->owner->getAttribute($this->leftAttribute)], |
| 95 |
|
['>', "{$tableName}.[[{$this->rightAttribute}]]", $this->owner->getAttribute($this->rightAttribute)], |
| 96 |
|
]; |
| 97 |
|
if ($depth !== null) { |
| 98 |
|
$condition[] = ['>=', "{$tableName}.[[{$this->depthAttribute}]]", $this->owner->getAttribute($this->depthAttribute) - $depth]; |
| 99 |
|
} |
| 100 |
|
|
| 101 |
|
$query = $this->owner->find() |
| 102 |
|
->andWhere($condition) |
|
@@ 153-155 (lines=3) @@
|
| 150 |
|
[$andSelf ? '<=' : '<', "{$tableName}.[[{$attribute}]]", $this->owner->getAttribute($this->rightAttribute)], |
| 151 |
|
]; |
| 152 |
|
|
| 153 |
|
if ($depth !== null) { |
| 154 |
|
$condition[] = ['<=', "{$tableName}.[[{$this->depthAttribute}]]", $this->owner->getAttribute($this->depthAttribute) + $depth]; |
| 155 |
|
} |
| 156 |
|
|
| 157 |
|
$query = $this->owner->find() |
| 158 |
|
->andWhere($condition) |