Example #1
0
 /**
  * @return GamePersonSpecialType
  */
 public function getGamePersonSpecialType()
 {
     if (!$this->gamePersonSpecialType) {
         $oGamePersonSpecialType = new GamePersonSpecialType($this->game_person_special_type_id);
         if ($oGamePersonSpecialType->exists()) {
             $this->gamePersonSpecialType = $oGamePersonSpecialType;
         }
     }
     return $this->gamePersonSpecialType;
 }
Example #2
0
 /**
  * @param string $gamePersonSpecialType
  * 
  * @return GamePersonSpecialType
  */
 protected function convertGamePersonSpecialType($gamePersonSpecialType)
 {
     if (!($oGamePersonSpecialType = GamePersonSpecialType::getByNefubName($gamePersonSpecialType))) {
         $oGamePersonSpecialType = new GamePersonSpecialType();
         $oGamePersonSpecialType->name = $gamePersonSpecialType;
         $oGamePersonSpecialType->nefub_name = $gamePersonSpecialType;
         $oGamePersonSpecialType->use = true;
         $oGamePersonSpecialType->save();
         $this->addedNefubObject($oGamePersonSpecialType);
     }
     return $oGamePersonSpecialType;
 }
Example #3
0
 protected function showGamePersonSpecialTypes()
 {
     $this->assign('title', 'Spelertypes');
     switch ($this->mode) {
         case 'bewerken':
             $oGamePerson = new GamePersonSpecialType($this->editId);
             $this->editObject($oGamePerson);
             break;
         default:
             $aGamePersons = GamePersonSpecialType::getAll(array(), 'name', 'asc');
             $this->assign('aTypes', $aGamePersons);
             $this->template = '/types.tpl';
             $this->showOutput();
     }
 }