public function actionTree()
    {
        $models = Category::find()->orderBy('position DESC, title')->all();
        $model = new Category();
        return $this->render('tree', [
            'model' => $model,
            'models' => $models,
        ]);
    }
public function actionTree()
    {
        $models = Category::find()->orderBy('position DESC, title')->all();
        $model = new Category();
        return $this->render('tree', [
            'model' => $model,
            'models' => $models,
        ]);
    }
public function actionTree ( ) { $ models = Category :: find ( ) -> orderBy ( 'position DESC, title' ) -> all ( ) ; $ model = new Category ( ) ; return $ this -> render ( 'tree' , [ 'model' => $ model , 'models' => $ models , ] ) ; }
Displays categories as tree.

@return mixed
Displays categories as tree .