コード例 #1
0
 /**
  * Fetch setting
  *
  * @return string
  */
 public function actionGetConfig()
 {
     $model = new DynaGridSettings();
     $out = ['status' => '', 'content' => ''];
     if ($model->load(Yii::$app->request->post()) && $model->validate()) {
         $out = ['status' => 'success', 'content' => print_r($model->getDataConfig(), true)];
     }
     echo Json::encode($out);
 }
コード例 #2
0
 /**
  * Fetch setting
  *
  * @return string
  */
 public function actionGetConfig()
 {
     Yii::$app->response->format = Response::FORMAT_JSON;
     $model = new DynaGridSettings();
     $out = ['status' => '', 'content' => ''];
     if ($model->load(Yii::$app->request->post()) && $model->validate()) {
         $out = ['status' => 'success', 'content' => print_r($model->getDataConfig(), true)];
     }
     return $out;
 }