Пример #1
0
 public function createComponent($name)
 {
     if (Strings::startsWith($name, 'vysledkovka')) {
         return $this->createComponentVysledkovka($name);
     }
     return parent::createComponent($name);
 }
Пример #2
0
 public function startup()
 {
     parent::startup();
     if (!$this->user->isLoggedIn()) {
         $this->redirect(':Frontend:Homepage:');
     }
 }
Пример #3
0
 /**
  * (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);
 }
Пример #4
0
 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);
     }
 }
Пример #5
0
 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');
 }
Пример #6
0
 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;
     }
 }
Пример #7
0
    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));
        }
    }
Пример #8
0
 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;
 }
Пример #9
0
 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;
     }
 }
Пример #10
0
 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();
 }
Пример #11
0
 public function handleDefaults()
 {
     $this->subject_id = 'all';
     unset($this->places);
     unset($this->events);
     parent::handleDefaults();
 }
Пример #12
0
 protected function startup()
 {
     parent::startup();
     $this->horninaObrazokRepository = $this->context->horninaObrazokRepository;
     $this->horninaRepository = $this->context->horninaRepository;
 }
Пример #13
0
 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);
 }
Пример #14
0
 public function startup() {
     parent::startup();
     $this->session->start(); // required by $form->addProtection()
 }
Пример #15
0
 protected function startup()
 {
     parent::startup();
     $this->ciselnikSkupinaRepository = $this->context->ciselnikSkupinaRepository;
 }
 protected function startup()
 {
     parent::startup();
     $this->lokalitaSlovenskoRepository = $this->context->lokalitaSlovenskoRepository;
 }
Пример #17
0
 public function startup()
 {
     parent::startup();
     $this->template->user = $this->user;
 }