public function addTeams(ArrayCollection $teams)
    {
        foreach ($teams as $team) {
            $team->addUser($this);
            $this->teams->add($team);
        }
    }
public function addTeams(ArrayCollection $teams)
    {
        foreach ($teams as $team) {
            $team->addUser($this);
            $this->teams->add($team);
        }
    }
public function addTeams ( ArrayCollection $ teams ) { foreach ( $ teams as $ team ) { $ team -> addUser ( $ this ) ; $ this -> teams -> add ( $ team ) ; } }
Add teams to the user

@param ArrayCollection $teams

@return void
Add teams to the user