Return next level children
@return \yii\db\ActiveQueryInterface
163625
public function getChildren()
    {
        return $this->owner
            ->hasMany($this->ownerClassName, [ $this->parentIdField => $this->primaryKey ])
            ->orderBy([
                "$this->tableName.$this->sortField" => SORT_ASC,
                "$this->tableName.$this->primaryKey" => SORT_ASC,
            ]);
    }
1330850
public function getChildren()
    {
        if ($this->children === null) {
            $this->setChildren($this->groupParameterRepository->getAllByParent($this));
        }
        return $this->children;
    }
402156
public function getTopChildren()
    {
        if (is_null($this->topMenuItems)) {
            $this->topMenuItems = [];
            foreach ($this->adaptors as $menuAdaptor) {
                $menuAdaptor->adaptChildren($this, $this->topMenuItems, null, $this->getRequest());
            }
        }

        return $this->topMenuItems;
    }
788640
public function get_children() {
        $children = array();

        if ($child = $this->get_area_coursecat_description(0, '/', '.')) {
            $children[] = $child;
        }

        list($coursecats, $hiddencats) = $this->get_categories();
        foreach ($coursecats as $category) {
            $context = context_coursecat::instance($category->id);
            $children[] = new self($this->browser, $context, $category);
        }

        $courses = $this->get_courses($hiddencats);
        foreach ($courses as $course) {
            $children[] = $this->get_child_course($course);
        }

        return array_filter($children);
    }
588787
function getChildren() {
        return $this->guild->channels->filter(function ($channel) {
            return ($channel->parentID === $this->id);
        });
    }
958756
public function getChilds()
    {
        if (config('menus.ordering')) {
            return collect($this->childs)->sortBy(function ($child) {
                return $child->order;
            })->all();
        }

        return $this->childs;
    }
10025
private function get_childs()
    {
       $this->childs = new \PHPTools\PHPHtmlDom\Core\PHPHtmlDomList($this->dom_element->childNodes);

       return $this;
    }
72797
public function getChildren()
    {
        $children = array();

        $wpTerms = get_terms($this->taxonomy->getName(), array(
            'hide_empty' => false,
            'parent'     => (int) $this->getId()
        ));

        foreach ($wpTerms as $termData) {
            $children[] = $this->termFactory->create($termData, $this->taxonomy);
        }

        return $children;
    }
469335
final public function next()
    {
        if (!$this->hasNext()) {
            return null;
        }

        $result = $this->client->performHttpCallToFullUrl(MollieApiClient::HTTP_GET, $this->_links->next->href);

        $collection = new static($this->client, $result->count, $result->_links);

        foreach ($result->_embedded->{$collection->getCollectionResourceName()} as $dataResult) {
            $collection[] = ResourceFactory::createFromApiResult($dataResult, $this->createResourceObject());
        }

        return $collection;
    }
568509
public function getChildren ($recursive = true, $includeInactiveFields = false)
    {
        $children = array();
        foreach ($this->children as $component)
            /* @var $component Component */
            if ($component->isActive() || $includeInactiveFields) {
                array_push($children, $component);
                if ($recursive)
                    $children = array_merge($children, $component->getChildren(true, $includeInactiveFields));
            }
        return $children;
    }
875471
public function children()
    {
        $result = [];
        foreach ($this->children as $childGroup) {
            $result = array_merge($result, $childGroup);
        }

        return $result;
    }
187525
public function leaves()
    {
        /** @var \yii\db\ActiveQuery $this */
        $class = $this->modelClass;
        $model = new $class;
        if ($model->hasProperty('leftAttribute')) {	///for nested sets
	        $db = $model->getDb();
	        return $this->andWhere([$model->rightAttribute => new Expression($db->quoteColumnName($model->leftAttribute) . '+ 1')]);
        } elseif ($model->hasProperty('parentAttribute')) {	///for adjacency list
        	///@see https://github.com/paulzi/yii2-adjacency-list/blob/master/AdjacencyListBehavior.php#L240
        	return $this->joinWith(['children' => function ($query) {
                /** @var \yii\db\ActiveQuery $query */
                $modelClass = $query->modelClass;
                $query->from($modelClass::tableName() . ' children');
            }])->andWhere(["children.[[{$model->parentAttribute}]]" => null]);
        } else {
        	throw new InvalidConfigException('The "model" property `leftAttribute` or `parentAttribute` must be set.');
        }
    }
636531
public function getChildrenNames()
    {
        if (null === $this->inheritanceColumn
            || !$this->inheritanceColumn->isEnumeratedClasses()) {
            return null;
        }

        $names = [];
        foreach ($this->inheritanceColumn->getChildren() as $child) {
            $names[] = get_class($child);
        }

        return $names;
    }
812957
public function getSiblings()
    {
        return (new Query())->where(['parent_nav_id' => $this->parentNavId, 'container' => $this->container])->with($this->_with)->lang($this->lang)->all();
    }
1077964
protected function NextChild()
    {
        $item = $this->current;
        $this->current = $this->tree->NextOf($item);
        return $item;
    }
985020
public function getChildrenRecursive()
    {
        $res = new ObjectCollection();
        foreach ($this->children() as $child) {
            $res->add($child);
            if ($child instanceof ParentNodeInterface) {
                $res->addMany($child->getChildrenRecursive());
            }
        }

        return $res;
    }
92706
public function actionIndex()
    {
        $query = Message::find();
        $dataProvider = new ActiveDataProvider([
            'query' => $query
        ]);

        $query->where(['parent' => null])
            ->andWhere(['or', ['from_id' => Yii::$app->user->getId()], ['user_id' => Yii::$app->user->getId()]])
            ->orderBy(['id' => SORT_DESC])->with('user');

        return $this->render('index', ['dataProvider' => $dataProvider]);
    }