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;
    }