public function indexAction() { $this->getLayout()->getHmenu()->add($this->getTranslator()->trans('menuWarList'), array('controller' => 'index', 'action' => 'index'))->add($this->getTranslator()->trans('menuGroupList'), array('action' => 'index')); $groupMapper = new GroupMapper(); $pagination = new \Ilch\Pagination(); $pagination->setPage($this->getRequest()->getParam('page')); $this->getView()->set('groups', $groupMapper->getGroupList($pagination)); $this->getView()->set('pagination', $pagination); }
public function indexAction() { $groupMapper = new GroupMapper(); $pagination = new \Ilch\Pagination(); $this->getLayout()->getAdminHmenu()->add($this->getTranslator()->trans('manageGroups'), array('action' => 'index')); if ($this->getRequest()->getPost('action') == 'delete' && $this->getRequest()->getPost('check_groups')) { foreach ($this->getRequest()->getPost('check_groups') as $groupId) { $groupMapper->delete($groupId); } } $pagination->setPage($this->getRequest()->getParam('page')); $this->getView()->set('groups', $groupMapper->getGroupList($pagination)); $this->getView()->set('pagination', $pagination); }