Esempio n. 1
0
 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:');
     }
 }
Esempio n. 3
0
 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);
 }
Esempio n. 5
0
 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;
 }
Esempio n. 6
0
 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
     }
 }
Esempio n. 7
0
 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;
 }
Esempio n. 8
0
 protected function startup()
 {
     parent::startup();
     $this->serverCmd = $this->context->serverCommander;
     $this->serverRepo = $this->context->serverRepository;
 }
Esempio n. 9
0
 protected function startup()
 {
     parent::startup();
     $this->users = $this->context->users;
     $this->authenticator = $this->context->authenticator;
 }
Esempio n. 10
0
 public function beforeRender()
 {
     parent::beforeRender();
     $this->template->registerHelper('getVersion', '\\gameUpdateModel::getVersionFromFileName');
 }
Esempio n. 11
0
 public function beforeRender()
 {
     parent::beforeRender();
     $this->template->hash = $this->runtimeHash;
 }