gets the level of this node

@return int
482935
public function getLevel()
    {
        if($this->level === null)
        {
            $this->level = count($this->getAncestors());
        }

        return $this->level;
    }
638806
def getLevel(self):
        
        lvl = 0
        p = self
        while True:
            p = p.parent
            if not isinstance(p, LPort):
                break
            lvl += 1
        return lvl
1343289
@Deprecated
    public int getLevel() {
        Level level = loggerProxy.getLevel();
        return level != null ? level.intValue() : 0;
    }
76334
public function getProgressToNextLevel()
    {
        if ($this->isTotal()) {
            return false;
        }

        $level = $this->getVirtualLevel();
        $currentLevelXp = $this->getSkill()->getXp($level);
        $nextLevelXp = $this->getSkill()->getXp($level + 1);

        if (!$nextLevelXp) {
            return false;
        }

        $totalXpInLevel = $nextLevelXp - $currentLevelXp;
        $xpInLevel = $this->getXp() - $currentLevelXp;

        return $xpInLevel / $totalXpInLevel;
    }
1240476
public function getParent()
    {
        $depth = $this->iterator->getDepth();

        return $depth === 0
            ? $this->id
            : $this->iterator->getSubIterator($depth - 1)->key();
    }
202274
protected Integer getTotalNumberOfChildren() {
        Integer numChildrenNodes = 0;
        for (Level childLevel : levels) {
            numChildrenNodes += childLevel.getTotalNumberOfChildren();
        }
        return nodes.size() + numChildrenNodes;
    }
1270056
public function getTree() {
    $children = array();
    $properties = $this->getChildProperties();
    $child = $this->head;
    $i = 0;
    while ($child) {
      $key = array_search($child, $properties, TRUE);
      if (!$key) {
        $key = $i;
      }
      if ($child instanceof ParentNode) {
        $children[$key] = $child->getTree();
      }
      else {
        /** @var TokenNode $child */
        $children[$key] = array($child->getTypeName() => $child->getText());
      }
      $child = $child->next;
      $i++;
    }
    $class_name = get_class($this);
    return array($class_name => $children);
  }
744051
protected function getLevel()
  {
    if($this->currObj instanceof TeamSpeak3_Node_Channel)
    {
      return $this->currObj->getLevel()+2;
    }
    elseif($this->currObj instanceof TeamSpeak3_Node_Client)
    {
      return $this->currObj->channelGetById($this->currObj->cid)->getLevel()+3;
    }

    return 1;
  }
669632
public function getChildren()
    {
        uasort(
            $this->children,
            function (AdminMenuItem $first, AdminMenuItem $second) {
                if ($first->getPriority() <= $second->getPriority()) {
                    return 1;
                }

                return -1;
            }
        );

        return $this->children;
    }
94904
private function getRootNodes()
    {
        $output = array();
        foreach( $this->nodes as $node )
            if (! $node->parentCount() )
                $output[] = $node;
        return $output;
    }
911673
public function getRoot() : Node {
        $node = $this;
        while ($node->parent !== null) {
            $node = $node->parent;
        }
        return $node;
    }
397281
public function getDepthAttribute()
    {
        $category = $this;

        return $this->remember('depth', function () use ($category) {
            $depth = 0;

            while ($category->parent) {
                $depth++;
                $category = $category->parent;
            }

            return $depth;
        });
    }
48244
public function multiLevelCount()
    {
        $levelCount = 0;
        foreach ($this->dataValues as $dataValueSet) {
            $levelCount = max($levelCount, count($dataValueSet));
        }
        return $levelCount;
    }
46557
public function getTitles()
    {
        $titles = array();
        $levels = array(&$titles);

        foreach ($this->nodes as $node) {
            if ($node instanceof TitleNode) {
                $level = $node->getLevel();
                $text = (string)$node->getValue();
                $redirection = $node->getTarget();
                $value = $redirection ? array($text, $redirection) : $text;

                if (isset($levels[$level-1])) {
                    $parent = &$levels[$level-1];
                    $element = array($value, array());
                    $parent[] = $element;
                    $levels[$level] = &$parent[count($parent)-1][1];
                }
            }
        }

        return $titles;
    }
1091761
public function fetchSingleValue()
	{
		$result = $this->query();
		$value = $result->fetchColumn(0);
		$result->closeCursor();
		return $value;
	}
952500
public function getNodeType()
    {
        $bag = hierarchy_bag('nodetype');

        if ($this->relationLoaded('nodeType'))
        {
            $nodeType = $this->getRelation('nodeType');
        } elseif ($nodeType = $bag->getNodeType($this->getNodeTypeKey()))
        {
            $this->setRelation('nodeType', $nodeType);
        } else
        {
            $nodeType = $this->load('nodeType')->getRelation('nodeType');
        }

        if ($nodeType)
        {
            $bag->addNodeType($nodeType);

            return $nodeType;
        }

        return null;
    }
395679
@Override
  public Level getLevel()
  {
    if (_localLevel != null) {
      Level level = _localLevel.get();

      if (level != null) {
        return level;
      }
    }

    return _systemLevel;
  }