get the current tree parent, null if root

@return null|string
320268
public function getParent()
    {
        if ($this->isRoot()) {
            return null;
        }

        return substr($this->subject->getFullPath(), 0, strrpos($this->subject->getFullPath(), '/'));
    }
84577
public function parent()
    {
        return $this->filter([
            'lft__lt' => $this->getModel()->lft,
            'rgt__gt' => $this->getModel()->rgt,
            'level' => $this->getModel()->level - 1,
            'root' => $this->getModel()->root,
        ]);
    }
1109310
public function getParents()
    {
        $parents = [];
        if ($this->parent && !$this->parent instanceof Root) {
            $parents = $this->parent->getParents();
            $parents[] = $this->parent;
        }

        return $parents;
    }
1320913
def get_parent(self):
        """"""

        parent_iter = self.model.iter_parent(self.iter)
        if parent_iter:
            return TreeModelRow(self.model, parent_iter)
1227062
public function getParent()
	{
		JLog::add('JTree::getParent() is deprecated.', JLog::WARNING, 'deprecated');

		$this->_current = &$this->_current->getParent();
	}
126989
public function parent()
    {
        if (!$this->extend) {
            return null;
        }

        if (!$this->parent) {
            $this->parent = $this->createSelf();

            $this->parent->render($this->extend, $this->data);
        }

        return $this->parent->getBlock($this->currentBlock);
    }
1344841
public function getParent()
    {
        if (!$this->currentFileName || !$this->metas) {
            return null;
        }

        $meta = $this->metas->get($this->currentFileName);

        if (!$meta || !isset($meta['parent'])) {
            return null;
        }

        $parent = $this->metas->get($meta['parent']);

        if (!$parent) {
            return null;
        }

        return $parent;
    }
1006938
public function parent() {
        $path = $this->path;

        array_pop($path);

        if (empty($path)) {
            throw new \RuntimeException("Can't get parent of root path");
        }

        return new static($path);
    }
353055
public function getRelativePath()
    {
        $root = $this;
        while ($root->getParent() != null) {
            $root = $root->getParent();
        }

        return substr($this->path, strlen($root->getPath()) + 1);
    }
343693
public function getCurrentBranch()
    {
        $branches = $this->getClient()->run($this, 'branch');
        $branches = explode("\n", $branches);

        foreach ($branches as $branch) {
            if ('*' === $branch[0]) {
                if (preg_match('/(detached|no branch)/', $branch)) {
                    return null;
                }

                return substr($branch, 2);
            }
        }
    }
255663
public function getRootContext()
    {
        if ($parentContext = $this->getParentContext()) {
            if ($parentContext instanceof ParentDelegationBuilder) {
                return $parentContext->getRootContext();
            }
            return $parentContext;
        }

        return $this;
    }
769056
public function getRoot()
    {
        if (!$this->root) {
            $this->root = $this->active->getContext()->getCurrentSiteNode();
        }

        return $this->root;
    }
278817
public function parent($node = null)
	{
		if ($node)
		{
			$parents = $this->xpath('ancestor-or-self::' . $node);
		}
		else
		{
			$parents = $this->xpath('parent::*');
		}

		return $parents[0];
	}
295160
public function getParent()
    {
        if ($this->isRoot()) throw new Exception\CMS('No parent for root Catalog');
    
        if (!$this->_parent) {
        
            $fields = self::getDbConnection()->fetchAssoc( 
                " SELECT A.*
                  FROM dir_data A, dir_structure B, dir_structure C 
                  WHERE C.data_id=? and B.data_id=A.id and B.lft<C.lft and B.rght>C.rght and B.level=C.level-1", 
                array( (int)$this->id )
            );        
        
            if ($fields) {
                $this->_parent = Catalog::fetch($fields);
            } else {
                $this->_parent = Catalog::getRoot();
            }
        }
        return $this->_parent;
    }
16102
protected function findBaseRootElement()
    {
        $root = $this->findBaseRootElementOrNull();
        if (is_null($root)) {
            $root = $this->createBaseRootElement();
        }
        return $root;
    }
985559
public function parent() {
		$parent = $this->domnode;
		if(!$parent)
			return new Node(null);
		while(true) {
			$parent = $parent->parentNode;
			if(!$parent)
				return;
			if($parent->nodeType == XML_ELEMENT_NODE)
				return new Node($parent);
		}
	}
252325
public static function get()
    {
        $db = Database::connection();
        $treeID = $db->fetchColumn('select Trees.treeID from TreeTypes inner join Trees on TreeTypes.treeTypeID = Trees.treeTypeID where TreeTypes.treeTypeHandle = ?', ['file_manager']);

        return $treeID ? Tree::getByID($treeID) : null;
    }