protected function startup() { parent::startup(); $this->taskLists = $this->context->taskLists; $this->tasks = $this->context->tasks; $this->users = $this->context->users; }
protected function startup() { parent::startup(); if (!$this->user->isAllowed('system')) { $this->flashMessage('Nemáte oprávnění pro přístup!', 'error'); $this->redirect('Homepage:'); } }
public function beforeRender() { parent::beforeRender(); // if (isset($this->opravneni)) // { // $this->template->opravneni = $this->opravneni; // } }
protected function startup() { parent::startup(); if (!$this->user->isAllowed('update', 'edit')) { $this->flashMessage('Nemáte oprávnění pro přístup!', 'error'); $this->redirect('Homepage:'); } $this->path = $this->serverRepo->getPath($this->selectedServerId); }
protected function startup() { parent::startup(); if (!$this->user->isAllowed('server-settings', 'view') and !$this->user->isAllowed('server-settings', 'edit')) { $this->flashMessage('Nemáte oprávnění pro přístup!', 'error'); $this->redirect('Homepage:'); } $this->context->systemConfigModel['storage']['common'] == "0" ? $this->commonStorage = FALSE : ($this->commonStorage = TRUE); $this->serverRepo = $this->context->serverRepository; $this->fileModel = $this->context->fileModel; }
public function beforeRender() { parent::beforeRender(); $nullUsers = $this->userRepository->findBy(array('uuid' => NULL, 'NOT mcname' => NULL)); try { foreach ($nullUsers as $user) { $identity = $this->uuidModel->getUuid($user->mcname, TRUE); $this->userRepository->setUUID($user->id, $identity['uuid']); $this->userRepository->setMcNick($user->id, $identity['name']); } } catch (RuntimeException $exc) { //echo nothing critical } }
public function beforeRender() { parent::beforeRender(); if (isset($this->id)) { if (!isset($this->rubrika)) { $this->rubrika = $this->redakce->findRubrikuById($this->id); } $this->template->rubrika = $this->rubrika; } if (isset($this->id_clanku)) { if (!isset($this->clanek)) { $this->clanek = $this->redakce->findClanekById($this->id_clanku); } $this->template->clanek = $this->clanek; } $this->template->id_hlavni_skupiny = $this->redakce->id_hlavni_skupiny; if (isset($this->opravneni)) { $this->template->opravneni = $this->opravneni; } $datum = new NDateTime53($this->redakce->zobrazit_od_datum_neschvaleneho_clanku . ' ' . $this->redakce->zobrazit_od_cas_neschvaleneho_clanku); $this->template->zobrazit_od_neschvaleneho_clanku = $datum; $this->template->backlink = $this->backlink; }
protected function startup() { parent::startup(); $this->serverCmd = $this->context->serverCommander; $this->serverRepo = $this->context->serverRepository; }
protected function startup() { parent::startup(); $this->users = $this->context->users; $this->authenticator = $this->context->authenticator; }
public function beforeRender() { parent::beforeRender(); $this->template->registerHelper('getVersion', '\\gameUpdateModel::getVersionFromFileName'); }
public function beforeRender() { parent::beforeRender(); $this->template->hash = $this->runtimeHash; }