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