| @@ 81-95 (lines=15) @@ | ||
| 78 | ); |
|
| 79 | } |
|
| 80 | ||
| 81 | public function modListAction() |
|
| 82 | { |
|
| 83 | $service = $this->getAdminGameService(); |
|
| 84 | $posts = $service->getPostVotePostMapper()->findBy(array('status' => 1)); |
|
| 85 | ||
| 86 | if (is_array($posts)) { |
|
| 87 | $paginator = new \Zend\Paginator\Paginator(new \Zend\Paginator\Adapter\ArrayAdapter($posts)); |
|
| 88 | $paginator->setItemCountPerPage(10); |
|
| 89 | $paginator->setCurrentPageNumber($this->getEvent()->getRouteMatch()->getParam('p')); |
|
| 90 | } else { |
|
| 91 | $paginator = $posts; |
|
| 92 | } |
|
| 93 | ||
| 94 | return array('posts' => $paginator); |
|
| 95 | } |
|
| 96 | ||
| 97 | public function moderationEditAction() |
|
| 98 | { |
|
| @@ 38-53 (lines=16) @@ | ||
| 35 | return $this->serviceLocator; |
|
| 36 | } |
|
| 37 | ||
| 38 | public function listAction() |
|
| 39 | { |
|
| 40 | $service = $this->getPrizeCategoryService(); |
|
| 41 | $categories = $service->getPrizeCategoryMapper()->findAll(); |
|
| 42 | ||
| 43 | if (is_array($categories)) { |
|
| 44 | $paginator = new \Zend\Paginator\Paginator(new \Zend\Paginator\Adapter\ArrayAdapter($categories)); |
|
| 45 | } else { |
|
| 46 | $paginator = $categories; |
|
| 47 | } |
|
| 48 | ||
| 49 | $paginator->setItemCountPerPage(10); |
|
| 50 | $paginator->setCurrentPageNumber($this->getEvent()->getRouteMatch()->getParam('p')); |
|
| 51 | ||
| 52 | return array('categories' => $paginator); |
|
| 53 | } |
|
| 54 | ||
| 55 | public function addAction() |
|
| 56 | { |
|