| @@ 164-178 (lines=15) @@ | ||
| 161 | return $viewModel->setVariables(array('form' => $form, 'title' => 'Edit Post & Vote')); |
|
| 162 | } |
|
| 163 | ||
| 164 | public function modListAction() |
|
| 165 | { |
|
| 166 | $service = $this->getAdminGameService(); |
|
| 167 | $posts = $service->getPostVotePostMapper()->findBy(array('status' => 1)); |
|
| 168 | ||
| 169 | if (is_array($posts)) { |
|
| 170 | $paginator = new \Zend\Paginator\Paginator(new \Zend\Paginator\Adapter\ArrayAdapter($posts)); |
|
| 171 | $paginator->setItemCountPerPage(10); |
|
| 172 | $paginator->setCurrentPageNumber($this->getEvent()->getRouteMatch()->getParam('p')); |
|
| 173 | } else { |
|
| 174 | $paginator = $posts; |
|
| 175 | } |
|
| 176 | ||
| 177 | return array('posts' => $paginator); |
|
| 178 | } |
|
| 179 | ||
| 180 | public function moderationEditAction() |
|
| 181 | { |
|
| @@ 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 | { |
|