Ejemplo n.º 1
0
 public function indexAction()
 {
     $this->getLayout()->getHmenu()->add($this->getTranslator()->trans('menuAwards'), array('action' => 'index'));
     $awardsMapper = new AwardsMapper();
     $this->getView()->set('awards', $awardsMapper->getAwards());
     $this->getView()->set('awardsCount', count($awardsMapper->getAwards()));
 }
Ejemplo n.º 2
0
 public function indexAction()
 {
     $this->getLayout()->getAdminHmenu()->add($this->getTranslator()->trans('menuAwards'), array('action' => 'index'));
     $awardsMapper = new AwardsMapper();
     if ($this->getRequest()->getPost('check_entries')) {
         if ($this->getRequest()->getPost('action') == 'delete') {
             foreach ($this->getRequest()->getPost('check_entries') as $awardsId) {
                 $awardsMapper->delete($awardsId);
             }
         }
     }
     $this->getView()->set('awards', $awardsMapper->getAwards());
 }