public function indexAction() { $this->getLayout()->getHmenu()->add($this->getTranslator()->trans('menuRules'), array('action' => 'index')); $ruleMapper = new RuleMapper(); $rules = $ruleMapper->getEntries(); $this->getView()->set('rules', $rules); }
public function indexAction() { $this->getLayout()->getAdminHmenu()->add($this->getTranslator()->trans('menuRules'), array('action' => 'index')); $ruleMapper = new RuleMapper(); if ($this->getRequest()->getPost('check_entries')) { if ($this->getRequest()->getPost('action') == 'delete') { foreach ($this->getRequest()->getPost('check_entries') as $ruleId) { $ruleMapper->delete($ruleId); } } } $entries = $ruleMapper->getEntries(); $this->getView()->set('entries', $entries); }