Example #1
0
 public function updatePnrExcedent(EPnr $pnr)
 {
     foreach ($pnr->getExcedents() as $excedent) {
         if (!$pnr->getPassagers()->contains($excedent->getPassager())) {
             $pnr->removeExcedent($excedent);
             $this->em->persist($pnr);
             $this->em->flush();
         }
     }
 }