| @@ 20-35 (lines=16) @@ | ||
| 17 | */ |
|
| 18 | protected $prizeCategoryService; |
|
| 19 | ||
| 20 | public function listAction() |
|
| 21 | { |
|
| 22 | $service = $this->getPrizeCategoryService(); |
|
| 23 | $categories = $service->getPrizeCategoryMapper()->findAll(); |
|
| 24 | ||
| 25 | if (is_array($categories)) { |
|
| 26 | $paginator = new \Zend\Paginator\Paginator(new \Zend\Paginator\Adapter\ArrayAdapter($categories)); |
|
| 27 | } else { |
|
| 28 | $paginator = $categories; |
|
| 29 | } |
|
| 30 | ||
| 31 | $paginator->setItemCountPerPage(10); |
|
| 32 | $paginator->setCurrentPageNumber($this->getEvent()->getRouteMatch()->getParam('p')); |
|
| 33 | ||
| 34 | return array('categories' => $paginator); |
|
| 35 | } |
|
| 36 | ||
| 37 | public function addAction() |
|
| 38 | { |
|
| @@ 125-139 (lines=15) @@ | ||
| 122 | return $viewModel->setVariables(array('form' => $form, 'title' => 'Edit Post & Vote')); |
|
| 123 | } |
|
| 124 | ||
| 125 | public function modListAction() |
|
| 126 | { |
|
| 127 | $service = $this->getAdminGameService(); |
|
| 128 | $posts = $service->getPostVotePostMapper()->findBy(array('status' => 1)); |
|
| 129 | ||
| 130 | if (is_array($posts)) { |
|
| 131 | $paginator = new \Zend\Paginator\Paginator(new \Zend\Paginator\Adapter\ArrayAdapter($posts)); |
|
| 132 | $paginator->setItemCountPerPage(10); |
|
| 133 | $paginator->setCurrentPageNumber($this->getEvent()->getRouteMatch()->getParam('p')); |
|
| 134 | } else { |
|
| 135 | $paginator = $posts; |
|
| 136 | } |
|
| 137 | ||
| 138 | return array('posts' => $paginator); |
|
| 139 | } |
|
| 140 | ||
| 141 | public function moderationEditAction() |
|
| 142 | { |
|