public function actionIndex()
 {
     $model = new ProductCategory('search');
     $model->unsetAttributes();
     if (isset($_GET['ProductCategory'])) {
         $model->attributes = $_GET['ProductCategory'];
     }
     $this->render('index', array('model' => $model));
 }
Example #2
0
 public function actionProducts($id = null)
 {
     if ($id === null) {
         $model = new ProductCategory('search');
         $model->unsetAttributes();
         $this->render('products', array('model' => $model));
     } else {
         $model = $this->loadProducts($id);
         $this->render('products_inner', array('model' => $model));
     }
 }