protected isOnLastLevelOfMenu ( Neos\ContentRepository\Domain\Model\NodeInterface $menuItemNode ) : boolean | ||
$menuItemNode | Neos\ContentRepository\Domain\Model\NodeInterface | |
return | boolean |
protected function isOnLastLevelOfMenu(NodeInterface $menuItemNode)
{
if ($this->currentLevel >= $this->getMaximumLevels()) {
return true;
}
if ($this->getLastLevel() !== null) {
if ($this->getNodeLevelInSite($menuItemNode) >= $this->calculateNodeDepthFromRelativeLevel($this->getLastLevel(), $this->currentNode)) {
return true;
}
}
return false;
}