/** * Manages all models. */ public function actionAdmin() { if (!Yii::app()->user->checkAccess('viewEditWRConfig')) { throw new CHttpException(403, Yii::t('http_status', '403')); } $model = new WaterSupply('search'); $model->unsetAttributes(); // clear any default values if (isset($_GET['WaterSupply'])) { $model->attributes = $_GET['WaterSupply']; } $this->render('admin', array('model' => $model)); }