| @@ 54-70 (lines=17) @@ | ||
| 51 | return $this->create($me); |
|
| 52 | } |
|
| 53 | ||
| 54 | public function editAction(Player $me, Team $team) |
|
| 55 | { |
|
| 56 | // TODO: Generating this response is unnecessary |
|
| 57 | $response = $this->edit($team, $me, "team"); |
|
| 58 | ||
| 59 | if ($this->newLeader) { |
|
| 60 | // Redirect to a confirmation form if we are assigning a new leader |
|
| 61 | $url = Service::getGenerator()->generate('team_assign_leader', array( |
|
| 62 | 'team' => $team->getAlias(), |
|
| 63 | 'player' => $this->newLeader->getAlias() |
|
| 64 | )); |
|
| 65 | ||
| 66 | return new RedirectResponse($url); |
|
| 67 | } |
|
| 68 | ||
| 69 | return $response; |
|
| 70 | } |
|
| 71 | ||
| 72 | public function deleteAction(Player $me, Team $team) |
|
| 73 | { |
|
| @@ 84-99 (lines=16) @@ | ||
| 81 | }); |
|
| 82 | } |
|
| 83 | ||
| 84 | public function editAction(Player $me, Match $match) |
|
| 85 | { |
|
| 86 | // TODO: Generating this response is unnecessary |
|
| 87 | $response = $this->edit($match, $me, "match"); |
|
| 88 | ||
| 89 | if ($this->recalculateNeeded) { |
|
| 90 | // Redirect to a confirmation form if we are assigning a new leader |
|
| 91 | $url = Service::getGenerator()->generate('match_recalculate', array( |
|
| 92 | 'match' => $match->getId(), |
|
| 93 | )); |
|
| 94 | ||
| 95 | return new RedirectResponse($url); |
|
| 96 | } |
|
| 97 | ||
| 98 | return $response; |
|
| 99 | } |
|
| 100 | ||
| 101 | public function recalculateAction(Player $me, $match) |
|
| 102 | { |
|