Neos.Neos/Classes/EventLog/Domain/Model/NodeEvent.php
public static function getClosestAggregateNode(NodeInterface $node)
    {
        while ($node !== null && !$node->getNodeType()->isAggregate()) {
            $node = $node->getParent();
        }
        return $node;
    }
public static function getClosestAggregateNode(NodeInterface $node)
    {
        while ($node !== null && !$node->getNodeType()->isAggregate()) {
            $node = $node->getParent();
        }
        return $node;
    }
public static function getClosestAggregateNode ( NodeInterface $ node ) { while ( $ node !== null && ! $ node -> getNodeType ( ) -> isAggregate ( ) ) { $ node = $ node -> getParent ( ) ; } return $ node ; }
Returns the closest aggregate node of the given node

@param NodeInterface $node
@return NodeInterface
Returns the closest aggregate node of the given node