Baum\Node::computeLevel PHP 메소드

computeLevel() 보호된 메소드

Compute current node level. If could not move past ourseleves return our ancestor count, otherwhise get the first parent level + the computed nesting.
protected computeLevel ( ) : integer
리턴 integer
    protected function computeLevel()
    {
        list($node, $nesting) = $this->determineDepth($this);
        if ($node->equals($this)) {
            return $this->ancestors()->count();
        }
        return $node->getLevel() + $nesting;
    }