コード例 #1
0
ファイル: SeekerController.php プロジェクト: quynhvv/stepup
 public function actionResumeEmploymentForm($id)
 {
     Yii::$app->response->format = 'json';
     $model = UserJobSeekerResume::findOne($id);
     if ($model === null) {
         return ['status' => 'error'];
     }
     $employment = new UserJobSeekerEmployment(['scenario' => 'create']);
     $employment->seeker_id = $model->_id;
     if ($employment->save()) {
         return ['status' => 'success', 'content' => $this->renderAjax('resume-employment', ['model' => $model, 'employment' => $employment, 'index' => $employment->_id])];
     }
     return ['status' => 'error'];
 }