public function startup() { parent::startup(); $this->users = $this->context->createServiceUsers(); $this->fbuser = $this->context->facebook->getUser(); $this->template->fbLoginUrl = $this->context->facebook->getLoginUrl(array('scope' => 'email', 'redirect_uri' => $this->link('//fblogin'))); }
protected function startup() { $this->context->authorizator->allow('guest', 'smallbackend'); parent::startup(); $this->places = $this->context->createServicePlaces(); $this->events = $this->context->createServiceTerms(); $this->sess = $this->getSession('events'); }
public function startup() { parent::startup(); $this->items = new \Model\Articles($this->ns); $vp = new \VisualPaginator($this, 'vp'); $this->paginator = $vp->getPaginator(); $this->paginator->itemsPerPage = 15; $this->template->items = $this->articles = $this->items->fetchAllEx($this->paginator->page, $this->paginator->itemsPerPage, 'published', 'DESC'); $this->paginator->itemCount = $this->template->count = $this->items->getCount(); }
/** * (non-phpDoc) * * @see Nette\Application\Presenter#startup() */ protected function startup() { $this->pagerPlaces = new \Pager($this, 'pagingPlaces'); parent::startup(); $this->items = $this->context->createService('times')->fetchPublic()->group('event_time.event_id'); if (is_string($this->category)) { $this->categories = array(); $id = $this->context->createServiceCategories()->where('code', $this->category)->order('shift DESC, name')->fetch()->id; $this->categories[$id] = 1; } }
protected function startup() { $this->pagerPlaces = new \Pager($this, 'pagingPlaces'); $this->pagerPlaces->itemsPerPage = $this->limit; parent::startup(); $this->items = $this->context->createServicePlaces(); if (is_string($this->category)) { $this->categories = array(); $id = $this->context->createServiceCategories()->where('code', $this->category)->order('shift DESC, name')->fetch(); if (!$id) { throw new \Nette\Application\BadRequestException('No category', 404); } $this->categories[$id->id] = 1; } }
public function startup() { parent::startup(); /** * Nastaveni obecneho pristupu do administrace */ if (!$this->user->isAllowed('frontend', 'default')) { $backlink = $this->presenter->storeRequest(); $this->redirect('Sign:in', $backlink); } /** * Zkontroluje zda je uživatel vůbec přihlášen */ if (!$this->user->isLoggedIn()) { $backlink = $this->presenter->storeRequest(); $this->redirect('Sign:in', $backlink); } $this->item = $this->context->createServiceUsers()->get($this->user->id); $this->subjects = $this->context->createServicePlaces()->where('user_id', $this->user->id); $this->events = $this->context->createServiceEvents()->where('subject_id', $this->subjects); $this->template->item = $this->item; }
protected function startup() { parent::startup(); }
public function startup() { parent::startup(); }
public function startup() { parent::startup(); $this->items = $this->context->createServiceCompetitions()->order('published DESC, changed DESC'); }