public function actionAdmin() { $model = new Attribute('search'); $model->unsetAttributes(); if (isset($_GET['Attribute'])) { $model->setAttributes($_GET['Attribute']); } $this->render('admin', array('model' => $model)); }
public function actionIndex() { $model = new Attribute('search'); $model->unsetAttributes(); // clear any default values if (isset($_GET['Attribute'])) { $model->attributes = $_GET['Attribute']; } $this->render('index', ['model' => $model]); }
/** * */ public function actionIndex() { $model = new Attribute('search'); $model->unsetAttributes(); $attributeGroup = new AttributeGroup('search'); $attributeGroup->unsetAttributes(); if (isset($_GET['Attribute'])) { $model->setAttributes($_GET['Attribute']); } $this->render('index', ['model' => $model, 'attributeGroup' => $attributeGroup]); }