add /team/new and /team/[i:id] and /team/list #16
Merged
mael.daim
merged 18 commits from team/bootstrap
into master
1 year ago
Loading…
Reference in new issue
There is no content yet.
Delete Branch 'team/bootstrap'
Deleting a branch is permanent. It CANNOT be undone. Continue?
/team/new : create a new team thanks to a form. The team is directly saved in the database after some validations. Afterward the brand new team is displayed
/team/[i:id]: The action that displays a specific team thnaks to its id.
/team/list: This action currently list all team that are in the database because there's still no account yet. Once it'll be added then this action should list all team of the current user thanks to his id.
class TeamController
{
private TeamModel $model;
private Environment $twig;
useless, remove this
private const ROLE_COACH = 1;
public const ROLE_PLAYER = 0;
public const ROLE_COACH = 1;
as you made public static functions
coach
andplayer
, you can bring back this as being private constantsreturn $teams;
}
public function displayTeam(int $id): Team {
you should not name this method as
displayX
as the class is only a class that manipulates data.The thing this method really does is that it gets a team, filled with its members from its identifier :
getTeam(int $id): Team
seems correct.b856e0c286
into master 1 year agoReviewers
b856e0c286
.