/** * Creates a new model. */ public function actionCreate() { $model = new PageMenu(); if (!$this->module->slugIdPrefix) { $model->scenario = 'noSlugIdPrefix'; } // Uncomment the following line if AJAX validation is needed // $this->performAjaxValidation($model); if (isset($_POST['PageMenu'])) { $model->attributes = $_POST['PageMenu']; if ($model->save()) { // using xreturnable extension to go back if (!$this->goBack()) { $this->redirect(array('admin')); } else { $this->goBack(); } } } else { $model->url = 'http://'; } $this->render('create', array('model' => $model)); }