/** * Управление галереями. * * @return void */ public function actionIndex() { $model = new Gallery('search'); $model->unsetAttributes(); // clear any default values $model->setAttributes(Yii::app()->getRequest()->getParam('Gallery', array())); $this->render('index', array('model' => $model)); }
/** * Lists all models. */ public function actionIndex() { $model = new Gallery('search'); $model->unsetAttributes(); // clear any default values if (isset($_GET['Gallery'])) { $model->attributes = $_GET['Gallery']; } $this->render('index', array('model' => $model)); }