/** * Updates an existing AuthAssignment model. * @param string $item_name * @param integer $user_id * @return mixed */ public function actionUpdate($item_name, $user_id) { $model = $this->findModel($item_name, $user_id); if (Yii::$app->request->isPost) { $model->load(Yii::$app->request->post()); Yii::$app->response->format = 'json'; if ($model->save()) { return Yii::$app->params['response']['success']; } else { return ActiveForm::validate($model); } } else { return $this->renderAjax('update', ['model' => $model, 'users' => User::getAllForLists(), 'authItems' => AuthItem::getAllForLists2()]); } }
public function run() { return $this->render('send-in-work', ['users' => User::getAllForLists(), 'subdivisions' => Subdivision::getAllForLists()]); }