public function actionCreate() { $model = new CatsModel(); if (isset($_POST['Cats'])) { $model->setAttrs($_POST['Cats']); $model->seo_url = Transliter::getSeo($model->en_name); $model->save(); $this->redirect("/admin/cats"); } $this->view("admin/cats/form", array("model" => "CatsModel"), false); }