private function pushRootModelToTreeCollection(
        DataProviderInterface $dataProvider,
        CollectionInterface $treeCollection,
        $level
    ) {
        $environment   = $this->getEnvironment();
        $inputProvider = $environment->getInputProvider();
        $baseConfig    = $this->prepareFilterForRootCondition();
        $relationships = $environment->getDataDefinition()->getModelRelationshipDefinition();

        if ($inputProvider->hasParameter('orderProperty') && $inputProvider->hasParameter('sortDirection')) {
            $orderProperty = $inputProvider->getParameter('orderProperty');
            $sortDirection = $inputProvider->getParameter('sortDirection');

            $baseConfig->setSorting([$orderProperty => $sortDirection]);
        }

        // Fetch all root elements.
        $collection = $dataProvider->fetchAll($baseConfig);
        if (!$collection->count()) {
            return;
        }

        $mySubTables = [];
        foreach ($relationships->getChildConditions($collection->get(0)->getProviderName()) as $condition) {
            $mySubTables[] = $condition->getDestinationName();
        }

        foreach ($collection as $model) {
            /** @var ModelInterface $model */
            $treeCollection->push($model);
            $this->treeWalkModel($model, ($level + 1), $mySubTables);
        }
    }