public function actionDefault($id) { if (!$id) { /** @var \stdClass $field */ $field = $this->VDataModel->getByUser($this->presenter->user->getId()); $id = $field->wref; } $this->template->village = $this->villageService->getVillage($id); $this->template->units = $this->unitsModel->get($id); $this->template->unitNames = $this->unitService->getNames(); }
public function render() { $id = $this->presenter->getParameter('id'); if (!$id) { /** @var \stdClass $field */ $field = $this->VDataModel->getByUser($this->presenter->user->getId()); $id = $field->wref; } $this->template->village = $this->villageService->getVillage($id); $this->template->setFile(__DIR__ . '/ResourceControl.latte'); $this->template->render(); }
public function actionDefault($id) { if (!$id) { /** @var \stdClass $field */ $field = $this->VDataModel->getByUser($this->presenter->user->getId()); $id = $field->wref; } $this->template->village = $village = $this->villageService->getVillage($id); $this->template->names = $this->buildingModel->getAll(); if ($village->getOwner()->tribe === 1) { $wallId = 31; } elseif ($village->getOwner()->tribe === 2) { $wallId = 32; } else { $wallId = 33; } $this->template->wallId = $wallId; $this->template->wallLevel = $village->getFData()['f' . $wallId]; }
public function render() { $id = $this->presenter->getParameter('id'); if (!$id) { /** @var \stdClass $field */ $field = $this->VDataModel->getByUser($this->presenter->user->getId()); $id = $field->wref; } $wref = $this->presenter->getParameter('wref'); if (!$wref) { $wref = $id; } $this->template->villageId = $id; $this->template->wref = $wref; $this->template->unread = $this->MDataModel->countUnread($this->presenter->getUser()->getId()) ? TRUE : FALSE; $this->template->report = $this->NDataModel->countUnread($this->presenter->getUser()->getId()) ? TRUE : FALSE; $this->template->plusActive = $this->userService->hasPlus($this->presenter->getUser()->getId()); $this->template->setFile(__DIR__ . '/HeaderControl.latte'); $this->template->render(); }