Exemple #1
0
 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);
 }