Beispiel #1
0
 /**
  * @param Team $team
  */
 public function addTeam(Team $team)
 {
     if ($this->teams->contains($team)) {
         return;
     }
     $this->teams->add($team);
     $team->addPlayer($this);
 }
Beispiel #2
0
 /**
  * @param Player $player
  */
 public function addPlayer(Player $player)
 {
     if ($this->players->contains($player)) {
         return;
     }
     $this->players->add($player);
     $player->addTeam($this);
 }