Esempio n. 1
0
 public function getGamesByUser($idUser)
 {
     $pairService = new PairService();
     $pairService->setManager($this->em);
     $pairs = $pairService->getPairByUser($idUser);
     $games = array();
     foreach ($pairs as $pair) {
         foreach ($this->getGamesByPair($pair->getId()) as $game) {
             $games[] = $game;
         }
     }
     return $games;
 }
Esempio n. 2
0
 public function getInscriptionsByUser($idUser)
 {
     $pairService = new PairService();
     $pairService->setManager($this->em);
     $pairs = $pairService->getPairByUser($idUser);
     $inscriptions = array();
     foreach ($pairs as $pair) {
         foreach ($this->getInscriptionsByPair($pair->getId()) as $ins) {
             $inscriptions[] = $ins;
         }
     }
     return $inscriptions;
 }