Get all root types
@return Array of Node instances
774228
protected function getRootTypes() {
    $types = null;
    $config = $this->getConfiguration();

    // get root types from configuration
    // try request value first
    $request = $this->getRequest();
    $rootTypeVar = $request->getValue('rootTypes');
    if ($config->hasValue($rootTypeVar, 'application')) {
      $types = $config->getValue($rootTypeVar, 'application');
      if (!is_array($types)) {
        $types = null;
      }
    }
    if ($types == null) {
      // fall back to root types
      $types = $config->hasValue('rootTypes', 'application');
    }

    // filter types by read permission
    $permissionManager = $this->getPermissionManager();
    $persistenceFacade = $this->getPersistenceFacade();
    $nodes = [];
    foreach($types as $type) {
      if ($permissionManager->authorize($type, '', PersistenceAction::READ)) {
        $node = $persistenceFacade->create($type, BuildDepth::SINGLE);
        $nodes[] = $node;
      }
    }
    return $nodes;
  }
559935
public function getRootCategories()
    {
        $rootCategories = [];
        foreach ($this->categories as $categories) {
            if ($categories->getLvl() == 0) {
                $rootCategories[] = $categories;
            }
        }

        return $rootCategories;
    }
986875
public function getAllNodeIds()
    {
        $ret = [];
        foreach ($this->items as $item) {
          $ret[] = $item->getNodeId();
        }
        return $ret;
    }
31805
public function getInstanceNodes(TreeNodeInterface $node)
    {
        $instanceNodes = [];
        foreach ($this->getAll() as $tree) {
            $instanceNodes = array_merge($instanceNodes, $tree->getInstances($node));
        }

        return $instanceNodes;
    }
926250
private function _getRoots()
    {
        $directories = [];

        if (is_string($this->module->root)) {
            $root = Yii::getAlias($this->module->root);
            if ($this->module->scanRootParentDirectory) {
                $root = dirname($root);
            }

            $directories[] = $root;
        } elseif (is_array($this->module->root)) {
            foreach ($this->module->root as $root) {
                $directories[] = Yii::getAlias($root);
            }
        } else {
            throw new InvalidConfigException('Invalid `root` option value!');
        }

        return $directories;
    }
504655
public function getTypes()
    {
        $classes = parent::getTypes();

        foreach ($classes as $k => &$definition) {

            if (empty($definition[$k]['properties'])) {
                unset($classes[$k]);
                continue;
            }

            $properties = array_filter(array_map(function ($property) {

                if (!empty($property['validation'])) {


                    foreach ($property['validation'] as &$rule){
                        foreach ($rule as $type => &$item) {

                            if ($type === 'Valid') {
                                continue;
                            } else {
                                if (!is_array($item)){
                                    $item = [];
                                }
                                $item['groups'] = ['xsd_rules'];
                            }

                        }
                        unset($item);
                    }
                    unset($rule);

                    return $property['validation'];
                }


                return null;
            }, $definition[$k]['properties']));

            if (empty($properties)) {
                unset($classes[$k]);
                continue;
            }

            $definition[$k] = [
                'properties' => $properties
            ];
        }

        return $classes;
    }
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;
    }
241839
public function getAllowedFileTypes()
	{
		$arrFileTypesOfParents = array();
		
		if ($this->fileTypesInherit && !$this->isRootCategory() && $this->hasParentCategory())
		{
			$arrFileTypesOfParents = $this->parentCategory->getAllowedFileTypes();
		}
		
		$arrFileTypes = DmsUtils::getUniqueFileTypes($this->fileTypes, $arrFileTypesOfParents);
		
		return $arrFileTypes;
	}
296063
protected String[] getTypes(boolean all) {

        if (!all) {
            String[] array = new String[3];
            return Arrays.asList(CmsPermissionDialog.PRINCIPAL_TYPES).subList(0, 3).toArray(array);
        }
        return CmsPermissionDialog.PRINCIPAL_TYPES;
    }
406705
protected function getTreeNodeStates()
    {
        $sessionStorage = $this->getEnvironment()->getSessionStorage();
        $openElements   = $sessionStorage->get($this->getToggleId());

        if (!\is_array($openElements)) {
            $openElements = [];
        }

        return new TreeNodeStates($openElements);
    }
338202
public static function getAll(): array
    {
        if (empty(self::$trees)) {
            self::$trees = self::all()->all();
        }

        return self::$trees;
    }
1244688
public function getTree()
    {
        $nodes = [];
        foreach ($this->nodes[$this->_config['rootid']]->getDescendants() as $subnode) {
            $nodes[] = $subnode;
        }
        return $nodes;
    }
273927
public function getPublicRoots()
    {
        $roots = [];
        foreach ($this->filesystems->keys() as $ident) {
            if ($this->isFilesystemPublic($ident)) {
                $disk = $this->getNamedRoot($ident);
                if ($disk !== null) {
                    $roots[$ident] = $disk;
                }
            }
        }

        return $roots;
    }
1327660
public function getBlockTypes()
    {
        $types = array();
        foreach ($this->alBlocks as $block) {
            $type = $block->getType();
            if ( !in_array($type, $types)) {
                $types[] = $type;
            }
        }

        return $types;
    }
1109310
public function getParents()
    {
        $parents = [];
        if ($this->parent && !$this->parent instanceof Root) {
            $parents = $this->parent->getParents();
            $parents[] = $this->parent;
        }

        return $parents;
    }
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;
    }
845237
public function getElementTypes()
    {
        $types = array();

        foreach ($this->elements as $key => $element) {
            $types[$key] = get_class($element);
        }

        return $types;
    }