| @@ 172-183 (lines=12) @@ | ||
| 169 | foreach ($tree_to_filter as $row_index => $row_to_filter) { |
|
| 170 | array_push($path, $row_index); |
|
| 171 | ||
| 172 | if ('before' == $options['recurse']) { |
|
| 173 | if ($children = $this->getChildren($row_to_filter)) { |
|
| 174 | $filtered_children = $this->foreachRow( |
|
| 175 | $root_cases, |
|
| 176 | $children, |
|
| 177 | $path, |
|
| 178 | $options |
|
| 179 | ); |
|
| 180 | ||
| 181 | $this->setChildren($row_to_filter, $filtered_children); |
|
| 182 | } |
|
| 183 | } |
|
| 184 | ||
| 185 | $matching_case = $this->applyOnRow($root_cases, $row_to_filter, $path, $options); |
|
| 186 | ||
| @@ 199-210 (lines=12) @@ | ||
| 196 | // row out of scope |
|
| 197 | } |
|
| 198 | ||
| 199 | if ('after' == $options['recurse']) { |
|
| 200 | if ($children = $this->getChildren($row_to_filter)) { |
|
| 201 | $filtered_children = $this->foreachRow( |
|
| 202 | $root_cases, |
|
| 203 | $children, |
|
| 204 | $path, |
|
| 205 | $options |
|
| 206 | ); |
|
| 207 | ||
| 208 | $this->setChildren($row_to_filter, $filtered_children); |
|
| 209 | } |
|
| 210 | } |
|
| 211 | ||
| 212 | array_pop($path); |
|
| 213 | } |
|