コード例 #1
0
ファイル: Index.php プロジェクト: prepare4battle/Ilch-2.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()));
 }
コード例 #2
0
ファイル: Index.php プロジェクト: prepare4battle/Ilch-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());
 }