コード例 #1
0
ファイル: MenuController.php プロジェクト: tqsq2005/Yii2adv
 public function actionDetail()
 {
     $id = Yii::$app->request->post('id', '1');
     $name = Yii::$app->request->post('name', '计生管理系统');
     $helpmenu = new Menu();
     if ($helpmenu->isParent($id)) {
         return $this->renderAjax('_menu-list', ['parent' => $id, 'parentName' => $name]);
     } else {
         return $this->renderAjax('view', ['model' => $this->findModel($id)]);
     }
 }