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