Neos\Neos\Fusion\AbstractMenuImplementation::calculateItemState PHP Method

calculateItemState() protected method

This method needs to be called inside buildItems() in the subclasses.
protected calculateItemState ( Neos\ContentRepository\Domain\Model\NodeInterface $node = null ) : string
$node Neos\ContentRepository\Domain\Model\NodeInterface
return string
    protected function calculateItemState(NodeInterface $node = null)
    {
        if ($node === null) {
            return self::STATE_ABSENT;
        }
        if ($node === $this->currentNode) {
            return self::STATE_CURRENT;
        }
        if ($node !== $this->currentNode->getContext()->getCurrentSiteNode() && in_array($node, $this->getCurrentNodeRootline(), true)) {
            return self::STATE_ACTIVE;
        }
        return self::STATE_NORMAL;
    }