@@ 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 | { |
@@ 37-52 (lines=16) @@ | ||
34 | return $this->serviceLocator; |
|
35 | } |
|
36 | ||
37 | public function listAction() |
|
38 | { |
|
39 | $service = $this->getPrizeCategoryService(); |
|
40 | $categories = $service->getPrizeCategoryMapper()->findAll(); |
|
41 | ||
42 | if (is_array($categories)) { |
|
43 | $paginator = new \Zend\Paginator\Paginator(new \Zend\Paginator\Adapter\ArrayAdapter($categories)); |
|
44 | } else { |
|
45 | $paginator = $categories; |
|
46 | } |
|
47 | ||
48 | $paginator->setItemCountPerPage(10); |
|
49 | $paginator->setCurrentPageNumber($this->getEvent()->getRouteMatch()->getParam('p')); |
|
50 | ||
51 | return array('categories' => $paginator); |
|
52 | } |
|
53 | ||
54 | public function addAction() |
|
55 | { |