| @@ 278-287 (lines=10) @@ | ||
| 275 | /** |
|
| 276 | * @return NodeMenuItem|null |
|
| 277 | */ |
|
| 278 | public function getCurrent() |
|
| 279 | { |
|
| 280 | $this->init(); |
|
| 281 | $breadCrumb = $this->getBreadCrumb(); |
|
| 282 | if (\count($breadCrumb) > 0) { |
|
| 283 | return $breadCrumb[\count($breadCrumb) - 1]; |
|
| 284 | } |
|
| 285 | ||
| 286 | return null; |
|
| 287 | } |
|
| 288 | ||
| 289 | /** |
|
| 290 | * @param int $depth |
|
| @@ 294-302 (lines=9) @@ | ||
| 291 | * |
|
| 292 | * @return NodeMenuItem|null |
|
| 293 | */ |
|
| 294 | public function getActiveForDepth($depth) |
|
| 295 | { |
|
| 296 | $breadCrumb = $this->getBreadCrumb(); |
|
| 297 | if (\count($breadCrumb) >= $depth) { |
|
| 298 | return $breadCrumb[$depth - 1]; |
|
| 299 | } |
|
| 300 | ||
| 301 | return null; |
|
| 302 | } |
|
| 303 | ||
| 304 | /** |
|
| 305 | * @param Node $node |
|