| @@ 79-99 (lines=21) @@ | ||
| 76 | ); |
|
| 77 | } |
|
| 78 | ||
| 79 | public function listCardAction() |
|
| 80 | { |
|
| 81 | $this->checkGame(); |
|
| 82 | ||
| 83 | $adapter = new DoctrineAdapter( |
|
| 84 | new LargeTablePaginator( |
|
| 85 | $this->getAdminGameService()->getMemoryCardMapper()->queryByGame($this->game) |
|
| 86 | ) |
|
| 87 | ); |
|
| 88 | $paginator = new Paginator($adapter); |
|
| 89 | $paginator->setItemCountPerPage(16); |
|
| 90 | $paginator->setCurrentPageNumber($this->getEvent()->getRouteMatch()->getParam('p')); |
|
| 91 | ||
| 92 | return new ViewModel( |
|
| 93 | array( |
|
| 94 | 'cards' => $paginator, |
|
| 95 | 'gameId' => $this->game->getId(), |
|
| 96 | 'game' => $this->game, |
|
| 97 | ) |
|
| 98 | ); |
|
| 99 | } |
|
| 100 | ||
| 101 | public function addCardAction() |
|
| 102 | { |
|
| @@ 76-96 (lines=21) @@ | ||
| 73 | ); |
|
| 74 | } |
|
| 75 | ||
| 76 | public function listModelAction() |
|
| 77 | { |
|
| 78 | $this->checkGame(); |
|
| 79 | ||
| 80 | $adapter = new DoctrineAdapter( |
|
| 81 | new LargeTablePaginator( |
|
| 82 | $this->getAdminGameService()->getTradingCardModelMapper()->queryByGame($this->game) |
|
| 83 | ) |
|
| 84 | ); |
|
| 85 | $paginator = new Paginator($adapter); |
|
| 86 | $paginator->setItemCountPerPage(25); |
|
| 87 | $paginator->setCurrentPageNumber($this->getEvent()->getRouteMatch()->getParam('p')); |
|
| 88 | ||
| 89 | return new ViewModel( |
|
| 90 | array( |
|
| 91 | 'models' => $paginator, |
|
| 92 | 'gameId' => $this->game->getId(), |
|
| 93 | 'game' => $this->game, |
|
| 94 | ) |
|
| 95 | ); |
|
| 96 | } |
|
| 97 | ||
| 98 | public function addModelAction() |
|
| 99 | { |
|
| @@ 589-609 (lines=21) @@ | ||
| 586 | return $grid->getResponse(); |
|
| 587 | } |
|
| 588 | ||
| 589 | public function invitationAction() |
|
| 590 | { |
|
| 591 | $this->checkGame(); |
|
| 592 | ||
| 593 | $adapter = new DoctrineAdapter( |
|
| 594 | new LargeTablePaginator( |
|
| 595 | $this->getAdminGameService()->getInvitationMapper()->queryByGame($this->game) |
|
| 596 | ) |
|
| 597 | ); |
|
| 598 | $paginator = new Paginator($adapter); |
|
| 599 | $paginator->setItemCountPerPage(25); |
|
| 600 | $paginator->setCurrentPageNumber($this->getEvent()->getRouteMatch()->getParam('p')); |
|
| 601 | ||
| 602 | return new ViewModel( |
|
| 603 | array( |
|
| 604 | 'invitations' => $paginator, |
|
| 605 | 'gameId' => $this->game->getId(), |
|
| 606 | 'game' => $this->game, |
|
| 607 | ) |
|
| 608 | ); |
|
| 609 | } |
|
| 610 | ||
| 611 | public function removeInvitationAction() |
|
| 612 | { |
|