/** * Creates a new Cos model. * If creation is successful, the browser will be redirected to the 'view' page. * @return mixed */ public function actionCreate() { $model = new Cos(); if ($model->load(Yii::$app->request->post()) && $model->save()) { GlobalFunctionController::activity_user("[CREATE COS] Name : {$model->name} ,Description : {$model->desc}, FORWARD_ON_RNA_enabled : {$model->FORWARD_ON_RNA_enabled}, FORWARD_ON_RNA_number : {$model->FORWARD_ON_RNA_number},FORWARD_ON_BUSY_enabled : {$model->FORWARD_ON_BUSY_enabled}, FORWARD_ON_BUSY_number : {$model->FORWARD_ON_BUSY_number}, FORWARD_UNC_enabled : {$model->FORWARD_UNC_enabled}, FORWARD_UNC_number : {$model->FORWARD_UNC_number}, clip : {$model->clip}, clir : {$model->clir}, mwi : {$model->mwi}, call_hunting : {$model->call_hunting}, call_hunting_type : {$model->call_hunting_type}"); Yii::$app->Controllers->historyUserWithData($model); echo 1; } else { return $this->renderAjax('create', ['model' => $model]); } }