@@ 318-331 (lines=14) @@ | ||
315 | if (\array_key_exists($node->getId(), $this->childNodes)) { |
|
316 | $nodes = $this->childNodes[$node->getId()]; |
|
317 | /* @var Node $childNode */ |
|
318 | foreach ($nodes as $childNode) { |
|
319 | $nodeTranslation = $childNode->getNodeTranslation( |
|
320 | $this->locale, |
|
321 | $this->includeOffline |
|
322 | ); |
|
323 | if (!\is_null($nodeTranslation)) { |
|
324 | $children[] = new NodeMenuItem( |
|
325 | $childNode, |
|
326 | $nodeTranslation, |
|
327 | false, |
|
328 | $this |
|
329 | ); |
|
330 | } |
|
331 | } |
|
332 | ||
333 | $children = array_filter( |
|
334 | $children, |
|
@@ 676-689 (lines=14) @@ | ||
673 | $topNodeMenuItems = array(); |
|
674 | $topNodes = $this->childNodes[0]; |
|
675 | /* @var Node $topNode */ |
|
676 | foreach ($topNodes as $topNode) { |
|
677 | $nodeTranslation = $topNode->getNodeTranslation( |
|
678 | $this->locale, |
|
679 | $this->includeOffline |
|
680 | ); |
|
681 | if (!\is_null($nodeTranslation)) { |
|
682 | $topNodeMenuItems[] = new NodeMenuItem( |
|
683 | $topNode, |
|
684 | $nodeTranslation, |
|
685 | null, |
|
686 | $this |
|
687 | ); |
|
688 | } |
|
689 | } |
|
690 | ||
691 | return $topNodeMenuItems; |
|
692 | } |