public function actionAddAuth() { $lang = $this->language; if (isset($_POST['Authority'])) { $auth = new Authority(); $auth->attributes = $_POST["Authority"]; $auth->save(); } $types = AuthorityType::model()->findAll("lang=:lang", array(":lang" => $lang)); $region = Region::model()->findByPk(array("id" => 1, "lang" => $lang)); $this->render('addAuth', array("types" => $types, "region" => $region)); }