public function action()
 {
     $team = new Team();
     $team->initById($this->parameters->teamId);
     $teamInJSON = JSONPrepare::team($team);
     $teamInJSON["footballers"] = JSONPrepare::footballers(FootballerSatellite::initForTeam($team));
     $teamInJSON["sponsors"] = JSONPrepare::sponsors(SponsorSatellite::initForTeam($team));
     $this->result['team'] = $teamInJSON;
 }
Exemplo n.º 2
0
 public static function team(Team $team)
 {
     $forJSON = array("level" => $team->getLevel(), "experience" => $team->getExperience(), "money" => $team->getMoney(), "realMoney" => $team->getRealMoney(), "studyPoints" => $team->getStudyPoints(), "energy" => $team->getCurrentEnergy(), "energyMax" => floor($team->getEnergyMax()), "trainerId" => $team->getTrainerId(), "teamName" => $team->getTeamName(), "teamLogoId" => $team->getTeamLogoId(), "paramForward" => $team->getParameterForward(), "paramHalf" => $team->getParameterHalf(), "paramSafe" => $team->getParameterSafe(), "isInstalled" => $team->getIsInstalled(), "socialUserId" => $team->getSocialUserId(), "userPhoto" => $team->getUserPhoto(), "userName" => $team->getUserName(), "isInTeam" => $team->getIsInTeam(), "studyPointsViaPrize" => $team->getStudyPointsViaPrize(), "inGroup" => $team->getInGroup(), "counterChoose" => $team->getCounterChoose(), "counterWon" => $team->getCounterWon(), "counterLose" => $team->getCounterLose(), "stadiumId" => $team->getStadiumId(), "needDailyBonus" => $team->isNeedDailyBonus(), "placeCountry" => $team->getPlaceCountry(), "placeCity" => $team->getPlaceCity(), "placeUniversity" => $team->getPlaceUniversity(), "placeVK" => $team->getPlaceVK(), "tourIIIcounter" => $team->getTourIII(), "tourPlaceCountry" => $team->getTourPlaceCountry(), "tourPlaceCity" => $team->getTourPlaceCity(), "tourPlaceUniversity" => $team->getTourPlaceUniversity(), "tourPlaceVK" => $team->getTourPlaceVK(), "tourNotify" => $team->getTourNotify(), "tourBonus" => $team->getTourBonus(), "tourBonusTime" => $team->getTourBonusTime(), "counterChoose" => $team->getCounterChoose(), "counterWon" => $team->getCounterWon(), "counterLose" => $team->getCounterLose(), "totalPlace" => $team->getTotalPlace(), "place" => isset($team->place) ? $team->place : 99);
     if (count($team->getFootballers())) {
         $forJSON["footballers"] = JSONPrepare::footballers($team->getFootballers());
     }
     if (count($team->getSponsors())) {
         $forJSON["sponsors"] = JSONPrepare::sponsors($team->getSponsors());
     }
     return $forJSON;
 }