Esempio n. 1
0
 public function startNextRound()
 {
     $currentRound = $this->roundRepo->findCurrent();
     // check if settings for next round exist
     if (!($nextRound = $this->roundRepo->find($currentRound->getId() + 1))) {
         $nextRound = clone $currentRound;
         // __clone removes id
         $this->em->persist($nextRound);
     }
     $currentRound->setFinished(true);
     $nextRound->setStarted(true);
     $this->em->flush();
 }
Esempio n. 2
0
 /**
  * @Route("/{round}/transactions", name="wallet_transactions", requirements={"round": "\d+"})
  * @Template()
  */
 public function walletTransactionsListAction($round = null)
 {
     $round = $round ? $this->roundRepo->find($round) : $this->roundRepo->findCurrent();
     $result = $this->manager->rawRequest('listtransactions', [$round->getWalletAccount(), 999999]);
     // we need to decode and encode to get pretty formated result
     $result = json_encode(json_decode($result), JSON_PRETTY_PRINT);
     return new Response('<pre>' . $result . '</pre>');
 }