NEXT_MAJOR: add this method to the interface.

@param bool|true $loadChildren

@return array
546869
public function getRootCategoriesSplitByContexts($loadChildren = true)
    {
        $rootCategories = $this->getAllRootCategories($loadChildren);

        $splitCategories = [];

        foreach ($rootCategories as $category) {
            $splitCategories[$category->getContext()->getId()][] = $category;
        }

        return $splitCategories;
    }
1323153
public function appendChildArray(array $children = null)
    {
        if (is_array($children) && !empty($children)) {
            foreach ($children as $child) {
                $this->appendChild($child);
            }
        }
    }
911501
protected function indexBySegment($dbChildren)
    {
        $bySegment = [];

        foreach ($dbChildren as $child) {
            $bySegment[$child->getPathSegment()] = $child;
        }

        return $bySegment;
    }
1084461
public function getChildrenNames()
    {
        if ($this->inheritanceColumn === null || !$this->inheritanceColumn->isEnumeratedClasses()) {
            return null;
        }
        $children = $this->inheritanceColumn->getChildren();
        $names = array();
        for ($i = 0, $size = count($children); $i < $size; $i++) {
            $names[] = get_class($children[$i]);
        }

        return $names;
    }
940202
public static function getChild($keys, array $values, $default = null, $link = '.') {
		return self::getChildByArray(explode($link, $keys), $values, $default);
	}
1082328
public function getChildren()
    {
        if ($this->_children === null) {
            $this->_children = $this->makeChildren();
        }
        return $this->_children;
    }
382428
public function getChildren()
    {
		if (!$this->_children)
		{
			if ($this->getParam('iterator')) {
				$this->_children = $this->getParam('iterator');
			}
			else {
				try {
					$this->_children = $this->getCatalog()->getMaterials();
                    if ($this->getParam('order')) {
                        $this->_children->orderBy($this->getParam('order'), $this->getParam('sort'));
                    }
                    $this->_children->orderBy('id', 'ASC', true);
					if ($this->getParam('subfolders') || $this->getParam('subsections')) {
						$this->_children->subfolders();
					}
					if ($this->getParam('filter')) {
						list($filter) = explode(';',$this->getParam('filter'));
						eval('$this->_children->'.$filter.';');
					}
				}
				catch (\Exception $e) {
					return [];
				}					
			}
			if ($this->getParam('limit')) $this->_children->setItemCountPerPage($this->getParam('limit')); 
			if ($this->getParam('where')) $this->_children->where($this->getParam('where')); 
			$this->_children->setCurrentPageNumber( $this->getPage() ); 			
		}
		return $this->_children;
    }
986926
public function getChildren()
    {
        $nodes = [];
        try {
            $child = $this->firstChild();
            do {
                $nodes[] = $child;
                $child   = $this->nextChild($child->id());
            } while ( ! is_null($child));
        } catch (ChildNotFoundException $e) {
            // we are done looking for children
        }

        return $nodes;
    }
203759
public function getParents(LoaderInterface $loader = null)
    {
        if (empty($this->parents) && $this->id !== static::$root)
            $this->parents = [$this->getRoot()];

        $acl = $this->getACL();
        if (null === $acl)
            throw new \RuntimeException("ACL is null on " . get_class($this));
        $parents = [];
        $ids = array_keys($this->parents);
        foreach ($ids as $id)
        {
            if ($this->parents[$id] === null)
            {
                if (!$acl->hasInstance(static::class, $id) && $loader !== null)
                {
                    $parent = $loader->load($id, static::class);
                    $acl->setInstance($parent);
                    $this->parents[$id] = $parent;
                }
                else
                {
                    $this->parents[$id] = $acl->getInstance(static::class, $id);
                }
            }
            $parents[] = $this->parents[$id];
        }
        return $parents;
    }
619707
public function Children() {
		if (!$this->children) {
			$this->children = new ArrayList();
			$kids = $this->stageChildren();
			if ($kids) {
				foreach ($kids as $child) {
					if ($child->canView()) {
						$this->children->push($child);
					}
				}
			}
		}
		return $this->children;
	}
419959
public function getChildren()
    {
        $children = array();

        // Add the rows
        foreach ($this->entities as $entity) {
            $children[] = new SimpleRow($entity, $this->columns);
        }

        return $children;
    }
180276
@SuppressWarnings({"unchecked", "rawtypes"})
  @Override
  public Collection<InjectionPlan<?>> getChildren() {
    return (Collection) Collections.unmodifiableCollection(Arrays.asList(this.alternatives));
  }
1206145
static protected function refDefs($childs=null) {
		$gname = get_called_class();
		$key = $gname . ( $childs ? '::' . $childs : '' );
		if (key_exists($key, static::$refDefCache)) { return static::$refDefCache[$key]; }
		$defs = static::selfRefDefs($key);
		foreach (class_uses($gname) as $trait) {
			if ('dt' != substr($trait, 0, 2)) { continue; }
			$traitName = substr($trait, 2);
			$callable = [ $gname, 'refDefs' . $traitName, ];
			$defs = array_merge($defs, call_user_func($callable, $key));
		}
		if ($parent = get_parent_class($gname)) {
			$defs = array_merge($defs, $parent::refDefs($key));
		}
		static::$refDefCache[$key] = $defs;
		return $defs;
	}
1276473
@Override
	public Map<String, Object> getChildren(Boolean includeInheritedFields)
	{
		Map<String, Object> fields = new HashMap<String, Object>();
		if (includeInheritedFields)
		{
			fields.putAll(super.getChildren(includeInheritedFields));
		}
		fields.put("unicode", this.unicode);
		return fields;
	}
1194612
public function getChildren()
    {
        if($this->children === null)
        {
            $this->children = $this->getDescendants(1);
        }

        return $this->children;
    }
398627
public function getChildren()
    {
        $children = [];
        foreach ($this->children as $type) {
            foreach ($type as $child) {
                $children[] = $child;
            }
        }

        return $children;
    }
11662
public function children()
    {
        if ($this->readonlyCollection === null) {
            $this->readonlyCollection = new ReadonlyObjectCollection(
                $this->writableChildren()
            );
        }

        return $this->readonlyCollection;
    }