/** * @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; }
/** * @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; }
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(); } }