Ejemplo n.º 1
0
 /**
  * @param string $name
  * @param int $money
  */
 private function createTeam($name, $money)
 {
     $team = new Team();
     $team->setName($name);
     $team->setMoney($money);
     /** @var League $league */
     $league = $this->getReference('league1');
     $team->setLeague($league);
     $this->manager->persist($team);
     $this->addReference('team' . $this->teamCounter++, $team);
 }