public function actionCreate() { $this->htmlOption = array('class' => 'icon-head head-products', 'header' => "添加国家", 'button' => array(array('class' => 'scalable save', 'id' => 'form-save', 'header' => '保存'))); $country = new country(); if ($_POST['country']) { $country->attributes = $_POST['country']; if ($country->save()) { $this->redirect(array('index')); } } $this->constructScript('create'); $this->sideView = 'sidebar/create'; $this->layout = 'column2'; $this->render('create', array('model' => $country)); }