Example #1
0
 public function actionIndex()
 {
     $model = new Categories('search');
     $model->unsetAttributes();
     // clear any default values
     if (isset($_GET['Categories'])) {
         $model->attributes = $_GET['Categories'];
     }
     $this->render('index', array('model' => $model));
 }
Example #2
0
 /**
  * Manages all models.
  */
 public function actionIndex()
 {
     try {
         $model = new Categories('search');
         $model->unsetAttributes();
         // clear any default values
         if (isset($_GET['Categories'])) {
             $model->attributes = $_GET['Categories'];
         }
         $this->render('index', array('model' => $model, 'actions' => $this->listActionsCanAccess));
     } catch (Exception $e) {
         Yii::log("Exception " . print_r($e, true), 'error');
         throw new CHttpException("Exception " . print_r($e, true));
     }
 }