Пример #1
0
 public function define($model)
 {
     try {
         $reward = new Reward();
         $reward->setAnimationname($model->animation);
         $reward->setLevel($model->level);
         $reward->setScene($model->scene);
         $reward->setName($model->name);
         $reward->setX(0);
         $reward->setY(0);
         $reward->setScale(1);
         $reward->save();
     } catch (PropelException $e) {
         $model->error->message = $e->getMessage();
         return $this->View($model);
     }
     return $this->RedirectToAction("listRewards");
 }
Пример #2
0
 /**
  * Exclude object from result
  *
  * @param   ChildReward $reward Object to remove from the list of results
  *
  * @return $this|ChildRewardQuery The current query, for fluid interface
  */
 public function prune($reward = null)
 {
     if ($reward) {
         $this->addUsingAlias(RewardTableMap::COL_ID, $reward->getId(), Criteria::NOT_EQUAL);
     }
     return $this;
 }