|
|
@ -29,12 +29,15 @@ class UserController {
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
public function home(SessionHandle $session): ViewHttpResponse {
|
|
|
|
public function home(SessionHandle $session): ViewHttpResponse {
|
|
|
|
$limitNbTactics = 5;
|
|
|
|
$limitNbTactics = 5;
|
|
|
|
$lastTactics = $this->tactics->getLast($limitNbTactics, $session->getAccount()->getUser()->getId());
|
|
|
|
|
|
|
|
$allTactics = $this->tactics->getAll($session->getAccount()->getUser()->getId());
|
|
|
|
$user = $session->getAccount()->getUser();
|
|
|
|
$name = $session->getAccount()->getUser()->getName();
|
|
|
|
|
|
|
|
|
|
|
|
$lastTactics = $this->tactics->getLast($limitNbTactics, $user->getId());
|
|
|
|
|
|
|
|
$allTactics = $this->tactics->getAll($user->getId());
|
|
|
|
|
|
|
|
$name = $user->getName();
|
|
|
|
|
|
|
|
|
|
|
|
if ($this->teams != null) {
|
|
|
|
if ($this->teams != null) {
|
|
|
|
$teams = $this->teams->getAll($session->getAccount()->getUser()->getId());
|
|
|
|
$teams = $this->teams->getAll($user->getId());
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
$teams = [];
|
|
|
|
$teams = [];
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -46,11 +49,7 @@ class UserController {
|
|
|
|
"username" => $name,
|
|
|
|
"username" => $name,
|
|
|
|
]);
|
|
|
|
]);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public function homeTwig(SessionHandle $session): ViewHttpResponse {
|
|
|
|
|
|
|
|
return ViewHttpResponse::twig("home.twig", []);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* @return ViewHttpResponse account settings page
|
|
|
|
* @return ViewHttpResponse account settings page
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|