/** * Manages all models. */ public function actionAdmin() { $model = new Sale('search'); $model->unsetAttributes(); // clear any default values if (isset($_GET['Sale'])) { $model->attributes = $_GET['Sale']; } $this->render('admin', array('model' => $model)); }
public function actionListSuspendedSale() { $model = new Sale(); $model->unsetAttributes(); $search = ''; if (isset($_GET['Sale'])) { //$model->attributes = $_GET['Sale']; $model->search_client = $_GET['Sale']['search_client']; } $this->render('sale_suspended', array('model' => $model, 'search' => $search)); }
/** * Manages all models. */ public function actionIndex() { $this->breadcrumbs = array('Акции' => array('/sale')); $model = new Sale('search'); $model->attachBehavior('dateComparator', array('class' => 'DateComparator')); $model->unsetAttributes(); // clear any default values // set attributes from get if (isset($_GET['Sale'])) { $model->attributes = $_GET['Sale']; } $this->render('list', array('model' => $model)); }