public function createComponent($name) { if (Strings::startsWith($name, 'vysledkovka')) { return $this->createComponentVysledkovka($name); } return parent::createComponent($name); }
public function startup() { parent::startup(); if (!$this->user->isLoggedIn()) { $this->redirect(':Frontend:Homepage:'); } }
/** * (non-phpDoc) * * @see Nette\Application\Presenter#startup() */ protected function startup() { parent::startup(); $this->files = new \Model\Filesystem($this->ns); $this->gallery = new Galleries($this->ns); $this->system = new \Model\System($this->ns); }
protected function startup() { parent::startup(); $this->pagerFiles = new \Pager($this, 'pagingFiles'); $this->files = $this->context->createServiceFiles(); if (!$this->user->isInRole('administrator')) { $this->files->where('file.user_id = ' . $this->user->id); } }
protected function startup() { $this->pagerPlaces = new \Pager($this, 'pagingPlaces'); $this->backlink = $this->getParameter('backlink'); parent::startup(); $this->places = $this->context->createService('places'); if (!$this->user->isInRole('administrator')) { $this->places->where('subject.user_id', $this->user->id); } $this->sess = $this->getSession('places'); }
public function startup() { parent::startup(); if (!isset($this->role)) { $this->role = null; } if (!isset($this->active)) { $this->active = null; } if (!isset($this->blocked)) { $this->blocked = null; } }
protected function startup() { parent::startup(); $this->pages = $this->getModel('PagesModel')->getPages(); // user authentication if (!$this->user->isLoggedIn()) { if ($this->user->logoutReason === User::INACTIVITY) { $this->flashMessage('Byl jste odhlášen z důvodu neaktivity. Přihlašte se prosím znovu.'); } $backlink = $this->application->storeRequest(); $this->redirect('Sign:in', array('backlink' => $backlink)); } }
protected function startup() { parent::startup(); $this->horninaRepository = $this->context->horninaRepository; $this->ciselnikSkupinaRepository = $this->context->ciselnikSkupinaRepository; $this->ciselnikFarbaRepository = $this->context->ciselnikFarbaRepository; $this->ciselnikPodskupinaRepository = $this->context->ciselnikPodskupinaRepository; $this->ciselnikTexturaRepository = $this->context->ciselnikTexturaRepository; $this->ciselnikStrukturaRepository = $this->context->ciselnikStrukturaRepository; $this->lokalitaSlovenskoRepository = $this->context->lokalitaSlovenskoRepository; $this->horninaLokalitaSlovenskoRepository = $this->context->horninaLokalitaSlovenskoRepository; $this->horninaStrukturaRepository = $this->context->horninaStrukturaRepository; $this->horninaTexturaRepository = $this->context->horninaTexturaRepository; }
public function startup() { parent::startup(); if (!isset($this->month)) { $this->month = date("n"); } if (!isset($this->year)) { $this->year = date("Y"); } if (!isset($this->userId)) { $this->userId = null; } if (!$this->user->isAllowed("UserFilter")) { $this->userId = $this->user->id; } }
protected function startup() { parent::startup(); $rbb = $this->getParameter('__rbb'); if ($rbb) { $this->isRequestButton = $this->template->isRequestButton = true; } else { $this->isRequestButton = $this->template->isRequestButton = false; } /** * Nastaveni obecneho pristupu do administrace */ if (!$this->context->user->isAllowed('smallbackend')) { $backlink = $this->storeRequest(); $this->redirect(':Sign:in', $backlink); } $this->profile = $this->context->createServiceUsers()->get($this->user->id); $this->template->profile = $this->profile; $this->template->const = $this->getReflection()->constants; $this->template->userPlacesCount = $this->context->createServicePlaces()->where('user_id', $this->user->id)->count(); }
public function handleDefaults() { $this->subject_id = 'all'; unset($this->places); unset($this->events); parent::handleDefaults(); }
protected function startup() { parent::startup(); $this->horninaObrazokRepository = $this->context->horninaObrazokRepository; $this->horninaRepository = $this->context->horninaRepository; }
public function startup() { parent::startup(); $this->subjects = $this->context->createServicePlaces()->where('user_id', $this->profile->id); $this->events = $this->context->createServiceEvents()->where('subject_id', $this->subjects); }
public function startup() { parent::startup(); $this->session->start(); // required by $form->addProtection() }
protected function startup() { parent::startup(); $this->ciselnikSkupinaRepository = $this->context->ciselnikSkupinaRepository; }
protected function startup() { parent::startup(); $this->lokalitaSlovenskoRepository = $this->context->lokalitaSlovenskoRepository; }
public function startup() { parent::startup(); $this->template->user = $this->user; }