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']; }