コード例 #1
0
 public function actionIndex()
 {
     $model = new ItemTemplate('search');
     $model->unsetAttributes();
     if (isset($_GET['classId'])) {
         $model->class = (int) $_GET['classId'];
     }
     if (isset($_GET['subClassId'])) {
         $model->subclass = (int) $_GET['subClassId'];
     }
     if (isset($_GET['invType'])) {
         $model->InventoryType = (int) $_GET['invType'];
     }
     if (isset($_GET['ItemTemplate'])) {
         $model->attributes = $_GET['ItemTemplate'];
     }
     $this->render('index', array('model' => $model));
 }
コード例 #2
0
 /**
  * Manages all models.
  */
 public function actionAdmin()
 {
     $model = new ItemTemplate('search');
     $model->unsetAttributes();
     // clear any default values
     if (isset($_GET['ItemTemplate'])) {
         $model->attributes = $_GET['ItemTemplate'];
     }
     $this->render('admin', array('model' => $model));
 }