public function actionAdmin() { $model = new Phone('search'); $model->unsetAttributes(); if (isset($_GET['Phone'])) { $model->setAttributes($_GET['Phone']); } $this->render('admin', array('model' => $model)); }
/** * Manages all models. */ public function actionAdmin() { $model = new Phone('search'); $model->unsetAttributes(); // clear any default values if (isset($_GET['Phone'])) { $model->attributes = $_GET['Phone']; } $this->render('admin', array('model' => $model)); }