| @@ 74-88 (lines=15) @@ | ||
| 71 | return $entries; |
|
| 72 | } |
|
| 73 | ||
| 74 | public function children() |
|
| 75 | { |
|
| 76 | $entries = $this->find([ |
|
| 77 | 'left_key >= :left_key: AND right_key <= :right_key: AND depth = :depth_plus: AND id <> :id: AND root = :root:', |
|
| 78 | 'order' => 'left_key ASC', |
|
| 79 | 'bind' => [ |
|
| 80 | 'id' => $this->getId(), |
|
| 81 | 'root' => $this->getRoot(), |
|
| 82 | 'depth_plus' => $this->getDepth() + 1, |
|
| 83 | 'left_key' => $this->getLeftKey(), |
|
| 84 | 'right_key' => $this->getRightKey(), |
|
| 85 | ] |
|
| 86 | ]); |
|
| 87 | return $entries; |
|
| 88 | } |
|
| 89 | ||
| 90 | public function hasChildren() |
|
| 91 | { |
|
| @@ 77-91 (lines=15) @@ | ||
| 74 | return $entries; |
|
| 75 | } |
|
| 76 | ||
| 77 | public function children() |
|
| 78 | { |
|
| 79 | $entries = $this->find([ |
|
| 80 | 'left_key >= :left_key: AND right_key <= :right_key: AND depth = :depth_plus: AND id <> :id: AND root = :root:', |
|
| 81 | 'order' => 'left_key ASC', |
|
| 82 | 'bind' => [ |
|
| 83 | 'id' => $this->getId(), |
|
| 84 | 'root' => $this->getRoot(), |
|
| 85 | 'depth_plus' => $this->getDepth() + 1, |
|
| 86 | 'left_key' => $this->getLeftKey(), |
|
| 87 | 'right_key' => $this->getRightKey(), |
|
| 88 | ] |
|
| 89 | ]); |
|
| 90 | return $entries; |
|
| 91 | } |
|
| 92 | ||
| 93 | public function hasChildren() |
|
| 94 | { |
|