Neos.Neos/Classes/Fusion/MenuItemsImplementation.php
protected function findParentNodeInBreadcrumbPathByLevel($givenSiteLevel, NodeInterface $startingPoint)
    {
        $parentNode = null;
        if ($givenSiteLevel === 0) {
            return $startingPoint;
        }

        $absoluteDepth = $this->calculateNodeDepthFromRelativeLevel($givenSiteLevel, $startingPoint);
        if (($absoluteDepth - 1) > $this->getNodeLevelInSite($startingPoint)) {
            return null;
        }

        $currentSiteNode = $this->currentNode->getContext()->getCurrentSiteNode();
        $breadcrumbNodes = $currentSiteNode->getContext()->getNodesOnPath($currentSiteNode, $startingPoint);

        if (isset($breadcrumbNodes[$absoluteDepth - 1])) {
            $parentNode = $breadcrumbNodes[$absoluteDepth - 1];
        }

        return $parentNode;
    }
protected function findParentNodeInBreadcrumbPathByLevel($givenSiteLevel, NodeInterface $startingPoint)
    {
        $parentNode = null;
        if ($givenSiteLevel === 0) {
            return $startingPoint;
        }

        $absoluteDepth = $this->calculateNodeDepthFromRelativeLevel($givenSiteLevel, $startingPoint);
        if (($absoluteDepth - 1) > $this->getNodeLevelInSite($startingPoint)) {
            return null;
        }

        $currentSiteNode = $this->currentNode->getContext()->getCurrentSiteNode();
        $breadcrumbNodes = $currentSiteNode->getContext()->getNodesOnPath($currentSiteNode, $startingPoint);

        if (isset($breadcrumbNodes[$absoluteDepth - 1])) {
            $parentNode = $breadcrumbNodes[$absoluteDepth - 1];
        }

        return $parentNode;
    }
protected function findParentNodeInBreadcrumbPathByLevel ( $ givenSiteLevel , NodeInterface $ startingPoint ) { $ parentNode = null ; if ( $ givenSiteLevel === 0 ) { return $ startingPoint ; } $ absoluteDepth = $ this -> calculateNodeDepthFromRelativeLevel ( $ givenSiteLevel , $ startingPoint ) ; if ( ( $ absoluteDepth - 1 ) > $ this -> getNodeLevelInSite ( $ startingPoint ) ) { return null ; } $ currentSiteNode = $ this -> currentNode -> getContext ( ) -> getCurrentSiteNode ( ) ; $ breadcrumbNodes = $ currentSiteNode -> getContext ( ) -> getNodesOnPath ( $ currentSiteNode , $ startingPoint ) ; if ( isset ( $ breadcrumbNodes [ $ absoluteDepth - 1 ] ) ) { $ parentNode = $ breadcrumbNodes [ $ absoluteDepth - 1 ] ; } return $ parentNode ; }
Finds the node in the current breadcrumb path between current site node and
current node whose level matches the specified entry level.

@param integer $givenSiteLevel The site level child nodes of the to be found parent node should have. See $this->entryLevel for possible values.
@param NodeInterface $startingPoint
@return NodeInterface The parent node of the node at the specified level or NULL if none was found
Finds the node in the current breadcrumb path between current site node and current node whose level matches the specified entry level .