public function render() { $warMapper = new WarMapper(); $status = '2'; $limit = '5'; $war = $warMapper->getWarListByStatusAndLimt($status, $limit); $this->getView()->set('war', $war); }
public function render() { $warMapper = new WarMapper(); $date = new \Ilch\Date(); $date = $date->format(null, true); $status = '1'; $limit = '5'; $war = $warMapper->getWarListByStatusAndLimt($status, $limit); $this->getView()->set('date', $date); $this->getView()->set('war', $war); }
public function showAction() { $groupMapper = new GroupMapper(); $warMapper = new WarMapper(); $pagination = new \Ilch\Pagination(); $id = $this->getRequest()->getParam('id'); $group = $groupMapper->getGroupById($id); $pagination->setPage($this->getRequest()->getParam('page')); $this->getLayout()->getHmenu()->add($this->getTranslator()->trans('menuWarList'), array('controller' => 'index', 'action' => 'index'))->add($this->getTranslator()->trans('menuGroupList'), array('action' => 'index'))->add($group->getGroupName(), array('action' => 'show', 'id' => $this->getRequest()->getParam('id'))); $this->getView()->set('group', $group); $this->getView()->set('war', $warMapper->getWarsByWhere('group =' . $id, $pagination)); $this->getView()->set('pagination', $pagination); }
public function showAction() { $warMapper = new WarMapper(); $gameMapper = new GameMapper(); $groupMapper = new GroupMapper(); $enemyMapper = new EnemyMapper(); $war = $warMapper->getWarById($this->getRequest()->getParam('id')); $this->getView()->set('games', $gameMapper->getGamesByWarId($this->getRequest()->getParam('id'))); $group = $groupMapper->getGroupById($war->getWarGroup()); $enemy = $enemyMapper->getEnemyById($war->getWarEnemy()); $this->getLayout()->getHmenu()->add($this->getTranslator()->trans('menuWarList'), array('action' => 'index'))->add($group->getGroupName(), array('controller' => 'group', 'action' => 'show', 'id' => $group->getId()))->add($this->getTranslator()->trans('warPlay'), array('action' => 'show', 'id' => $this->getRequest()->getParam('id'))); $this->getView()->set('group', $group); $this->getView()->set('enemy', $enemy); $this->getView()->set('war', $war); }
public function delAction() { if ($this->getRequest()->isSecure()) { $id = (int) $this->getRequest()->getParam('id'); $warMapper = new WarMapper(); $warMapper->delete($id); $this->addMessage('deleteSuccess'); } $this->redirect(array('action' => 'index')); }