public function indexAction() { $this->getLayout()->getAdminHmenu()->add($this->getTranslator()->trans('menuHistorys'), array('action' => 'index')); $historyMapper = new HistoryMapper(); if ($this->getRequest()->getPost('check_entries')) { if ($this->getRequest()->getPost('action') == 'delete') { foreach ($this->getRequest()->getPost('check_entries') as $historyId) { $historyMapper->delete($historyId); } } } $entries = $historyMapper->getEntries(); $this->getView()->set('entries', $entries); }
public function indexAction() { $historyMapper = new HistoryMapper(); $this->getLayout()->getHmenu()->add($this->getTranslator()->trans('menuHistorys'), array('action' => 'index')); $this->getView()->set('historys', $historyMapper->getEntries()); }