Neos\Neos\TypoScript\AbstractMenuImplementation::getNodeLevelInSite PHP Method

getNodeLevelInSite() protected method

0 = Site root node
protected getNodeLevelInSite ( Neos\ContentRepository\Domain\Model\NodeInterface $node ) : integer
$node Neos\ContentRepository\Domain\Model\NodeInterface
return integer
    protected function getNodeLevelInSite(NodeInterface $node)
    {
        $siteNode = $this->currentNode->getContext()->getCurrentSiteNode();
        return $node->getDepth() - $siteNode->getDepth();
    }