1 | <?php |
||
29 | trait Competition |
||
30 | { |
||
31 | use NameEntity; |
||
32 | |||
33 | //<editor-fold desc="Fields"> |
||
34 | /** |
||
35 | * @ORM\ManyToOne(targetEntity="\Tfboe\FmLib\Entity\TournamentInterface", inversedBy="competitions") |
||
36 | * @var TournamentInterface |
||
37 | */ |
||
38 | private $tournament; |
||
39 | |||
40 | /** |
||
41 | * @ORM\OneToMany(targetEntity="\Tfboe\FmLib\Entity\Team", mappedBy="competition", indexBy="startNumber") |
||
42 | * @var Collection|Team[] |
||
43 | */ |
||
44 | private $teams; |
||
45 | |||
46 | /** |
||
47 | * @ORM\OneToMany(targetEntity="\Tfboe\FmLib\Entity\PhaseInterface", mappedBy="competition", indexBy="phaseNumber") |
||
48 | * @var Collection|PhaseInterface[] |
||
49 | */ |
||
50 | private $phases; |
||
51 | //</editor-fold desc="Fields"> |
||
52 | |||
53 | //<editor-fold desc="Public Methods"> |
||
54 | /** |
||
55 | * @inheritDoc |
||
56 | */ |
||
57 | public function getChildren(): Collection |
||
61 | |||
62 | /** |
||
63 | * @inheritDoc |
||
64 | */ |
||
65 | public function getLevel(): int |
||
69 | |||
70 | /** |
||
71 | * @inheritDoc |
||
72 | */ |
||
73 | public function getLocalIdentifier() |
||
77 | |||
78 | /** |
||
79 | * @inheritDoc |
||
80 | */ |
||
81 | public function getParent(): ?TournamentHierarchyInterface |
||
85 | |||
86 | /** |
||
87 | * @return PhaseInterface[]|Collection |
||
88 | */ |
||
89 | public function getPhases() |
||
93 | |||
94 | /** |
||
95 | * @return Team[]|Collection |
||
96 | */ |
||
97 | public function getTeams() |
||
101 | |||
102 | /** |
||
103 | * @return TournamentInterface |
||
104 | */ |
||
105 | public function getTournament(): TournamentInterface |
||
109 | |||
110 | /** |
||
111 | * Competition constructor. |
||
112 | */ |
||
113 | public function init() |
||
118 | |||
119 | /** |
||
120 | * @param TournamentInterface $tournament |
||
121 | * @return $this|CompetitionInterface|Competition |
||
122 | */ |
||
123 | public function setTournament(TournamentInterface $tournament) |
||
132 | //</editor-fold desc="Public Methods"> |
||
133 | } |