public function indexAction() { $this->getLayout()->getHmenu()->add($this->getTranslator()->trans('menuWarList'), array('action' => 'index')); $pagination = new \Ilch\Pagination(); $warMapper = new WarMapper(); $pagination->setPage($this->getRequest()->getParam('page')); $this->getView()->set('war', $warMapper->getWarList($pagination)); $this->getView()->set('pagination', $pagination); }
public function indexAction() { $warMapper = new WarMapper(); $pagination = new \Ilch\Pagination(); $this->getLayout()->getAdminHmenu()->add($this->getTranslator()->trans('manageWarOverview'), array('action' => 'index')); if ($this->getRequest()->getPost('action') == 'delete' && $this->getRequest()->getPost('check_war')) { foreach ($this->getRequest()->getPost('check_war') as $warId) { $warMapper->delete($warId); } } $pagination->setPage($this->getRequest()->getParam('page')); if ($this->getRequest()->getPost('filter') == 'filter' and $this->getRequest()->getPost('filterLastNext') != '0') { $status = $this->getRequest()->getPost('filterLastNext'); $this->getView()->set('war', $warMapper->getWarListByStatus($status, $pagination)); } else { $this->getView()->set('war', $warMapper->getWarList($pagination)); } $this->getView()->set('pagination', $pagination); }