Neos.Neos/Classes/Fusion/MenuItemsImplementation.php
protected function calculateNodeDepthFromRelativeLevel($relativeLevel, NodeInterface $referenceNode)
    {
        if ($relativeLevel > 0) {
            $depth = $relativeLevel;
        } else {
            $currentSiteDepth = $this->getNodeLevelInSite($referenceNode);
            if ($currentSiteDepth + $relativeLevel < 1) {
                $depth = 1;
            } else {
                $depth = $currentSiteDepth + $relativeLevel + 1;
            }
        }

        return $depth;
    }
protected function calculateNodeDepthFromRelativeLevel($relativeLevel, NodeInterface $referenceNode)
    {
        if ($relativeLevel > 0) {
            $depth = $relativeLevel;
        } else {
            $currentSiteDepth = $this->getNodeLevelInSite($referenceNode);
            if ($currentSiteDepth + $relativeLevel < 1) {
                $depth = 1;
            } else {
                $depth = $currentSiteDepth + $relativeLevel + 1;
            }
        }

        return $depth;
    }
protected function calculateNodeDepthFromRelativeLevel ( $ relativeLevel , NodeInterface $ referenceNode ) { if ( $ relativeLevel > 0 ) { $ depth = $ relativeLevel ; } else { $ currentSiteDepth = $ this -> getNodeLevelInSite ( $ referenceNode ) ; if ( $ currentSiteDepth + $ relativeLevel < 1 ) { $ depth = 1 ; } else { $ depth = $ currentSiteDepth + $ relativeLevel + 1 ; } } return $ depth ; }
Calculates an absolute depth value for a relative level given.

@param integer $relativeLevel
@param NodeInterface $referenceNode
@return integer
Calculates an absolute depth value for a relative level given .