public function actionAdmin() { $model = new Vendor('search'); $model->unsetAttributes(); if (isset($_GET['Vendor'])) { $model->setAttributes($_GET['Vendor']); } $this->render('admin', array('model' => $model)); }