Example #1
0
 public function actionAjax()
 {
     if (isset($_POST['sortable'])) {
         Category::save_order($_POST['sortable']);
     }
     $data = Category::find()->asArray()->orderBy('parent,position asc')->all();
     $tree = Category::mapTree($data);
     return $this->renderPartial('_orderAjax', array('model' => $tree));
 }