Get root nodes
@return array
557094
public function getRootNodes()
	{
		$filter = new DoctrineSearchCondition();
		$filter->levelEqualsTo(0);
		
		$order = new DoctrineSelectOrder();
		$order->byLeftAscending();
		
		$rootNodes = $this->nestedSetRepository->search($filter, $order);
		
		return $rootNodes;
	}
918440
protected function getClonedNodes()
    {
        $cloned_nodes = array();

        foreach ($this->nodes as $node) {
            $cloned_node = $node->cloneNode(true);

            if ($cloned_node instanceof \DOMElement && $cloned_node->hasAttribute('dqn_tmp_id')) {
                $cloned_node->removeAttribute('dqn_tmp_id');
            }

            $cloned_nodes[] = $cloned_node;
        }

        return $cloned_nodes;
    }
93594
public function getNodes()
    {
        $nodes = [];
        foreach ($this->applications as $application) {
            foreach ($application->getNodes() as $node) {
                $nodes[$node->getName()] = $node;
            }
        }

        return $nodes;
    }
31704
public function getRootFamilies()
    {
        $root = [];
        foreach ($this->getFamilies() as $family) {
            if ($family->isInstantiable()) {
                $p = $family->getParent();
                if (!$p || ($p && !$p->isInstantiable())) {
                    $root[$family->getCode()] = $family;
                }
            }
        }

        return $root;
    }
891784
public function getParentsList()
    {
        /** @var static $root */
        $root  = static::root();
        $items = [
            ['id' => '1', 'title' => 'Item Root'],
        ];
        $nodes = $root->descendants();
        if ($this->exists) {
            $nodes->where('navigation_id', $this->navigation_id)->where('id', '<>', $this->id);
        }

        foreach ($nodes->get() as $node) {
            foreach ($node->getDescendantsAndSelf()->toHierarchy() as $menu) {
                $this->appendMenu($menu, $items);
            }
        }

        return array_pluck($items, 'title', 'id');
    }
380774
public function getAutoCreatedChildNodes()
    {
        $this->initialize();
        if (!isset($this->fullConfiguration['childNodes'])) {
            return [];
        }

        $autoCreatedChildNodes = [];
        foreach ($this->fullConfiguration['childNodes'] as $childNodeName => $childNodeConfiguration) {
            if (isset($childNodeConfiguration['type'])) {
                $autoCreatedChildNodes[Utility::renderValidNodeName($childNodeName)] = $this->nodeTypeManager->getNodeType($childNodeConfiguration['type']);
            }
        }

        return $autoCreatedChildNodes;
    }
783048
def getRootNode(nodes):
    ''''''
    max = 0
    root = None
    for i in nodes:
        if len(i.children) > max:
            max = len(i.children)
            root = i
    return root
247930
public function getGroups()
    {
        $groups = [];

        foreach ($this->rootlineElements as $rootlineElement) {
            $rootlineElementGroups = $rootlineElement->getGroups();
            $groups = array_merge($groups, $rootlineElementGroups);
        }

        $groups = $this->cleanGroupArray($groups);

        return $groups;
    }
1361613
public function getTree(): array
    {
        $tree = [];
        $size = count($this->segments);

        for ($index = 0; $index < $size; $index = $index + 1) {
            $temp = array_slice($this->segments, 0, $index + 1);
            $path = implode(DIRECTORY_SEPARATOR, $temp);

            $tree[] = Path::normalize($path);
        }

        return $tree;
    }
947159
public function getRoot() {
        $objWebClient = $this->getWebClient();

        $strUri = $this->getApiUrl() . '/';
        $arrHeaders = $this->getHeaders();

        $objRequest = $objWebClient->get($strUri, $arrHeaders);

        $this->objResponse = $objRequest->send();
        $strResponse = $this->objResponse->getBody(TRUE);

        return $strResponse;
    }
356163
protected function getRootTreeData()
    {
        return [
            'id' => '0',
            'parent' => '#',
            'text' => $this->treeLabels['top_level_tags'],
            'children' => true,
            'state' => [
                'opened' => true,
            ],
            'a_attr' => [
                'href' => $this->treeLinks['top_level_tags'],
                'rel' => '0',
            ],
            'data' => [
                'context_menu' => [
                    [
                        'name' => 'add_child',
                        'url' => str_replace(':parentId', 0, $this->treeLinks['add_child']),
                        'text' => $this->treeLabels['add_child'],
                    ],
                ],
            ],
        ];
    }
528478
public function getCallGraph()
    {
        $node = $root = new Node(array());
        foreach ($this->getQueries() as $query) {
            foreach (array_reverse($query['trace']) as $trace) {
                $node = $node->push($trace);
            }
            $node->addValue($query);
            $node = $root;
        }

        return $root;
    }
482870
public function getSubnodes()
    {
        $sort = \Doctrine\Common\Collections\Criteria::create();
        $sort->orderBy([
            'priority' => \Doctrine\Common\Collections\Criteria::DESC,
        ]);

        return $this
            ->subnodes
            ->matching($sort);
    }
48914
public function getBranches()
    {
        $branches = array();

        $xml = $this->execute('branch');

        foreach ($xml->branch as $xmlBranch) {
            $branch = new BranchSummary;
            $branch->setName(self::normalise($xmlBranch->name, 'string'));
            $branch->setFirmId(self::normalise($xmlBranch->firmid, 'int'));
            $branch->setBranchId(self::normalise($xmlBranch->branchid, 'int'));
            $branch->setUrl(self::normalise($xmlBranch->url, 'string'));
            $branches[] = $branch;
        }

        return $branches;
    }
1016866
public function parents(): array
    {
        if (!$this->_parent) {
            return array();
        }
        $nodes = $this->_parent->parents();
        $nodes[] = $this->_parent;
        return array_reverse($nodes);
    }
66186
private function collectTopStackNodes()
    {
        $nodes = [];

        while (!$this->stack->isEmpty() && $this->stack->top() instanceof Node) {
            array_unshift($nodes, $this->stack->pop());
        }

        return $nodes;
    }
1026785
public function getDescendants()
    {
        $descendants = [];

        $descendants[$this->name] = $this->appName;

        /** @var $child Node */
        foreach ($this->children as $child) {
            $childDescendats = $child->getDescendants();
            $descendants = array_merge($childDescendats, $descendants);
        }

        return $descendants;
    }