/** * Manages all models. */ public function actionAdmin() { $model = new Scheme('search'); $model->unsetAttributes(); // clear any default values if (isset($_GET['Scheme'])) { $model->attributes = $_GET['Scheme']; } $this->render('admin', array('model' => $model)); }
/** * Manages all models. */ public function actionAdmin() { if (Yii::app()->user->checkAccess($this->id . '.' . $this->action->id)) { $model = new Scheme('search'); $model->unsetAttributes(); // clear any default values if (isset($_GET['Scheme'])) { $model->attributes = $_GET['Scheme']; } $this->render('admin', array('model' => $model)); } else { $this->accessDenied(); } }