public function gameAction() { $this->getLayout()->setFile('modules/admin/layouts/ajax'); $gameMapper = new GamesMapper(); if ($this->getRequest()->getParam('id')) { $this->getView()->set('games', $gameMapper->getGamesByWarId($this->getRequest()->getParam('id'))); } }
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); }