protected function startup() { parent::startup(); if (!$this->user->isInRole(UserManager::ROLE_ADMIN)) { throw new BadRequestException(); } }
public function startup() { parent::startup(); // TODO: Change the autogenerated stub $this->steelCheck('Pro správu tagů musíš být přihlášen.', []); $this->template->title = 'Tagy'; }
protected function startup() { if (!$this->getUser()->isLoggedIn()) { $this->redirect(':Sign:in'); } parent::startup(); }
public function startup() { parent::startup(); $session = $this->getSession('mysection'); $session->user = '******'; dump($session); }
protected function beforeRender() { $file = '/static/bundle.js'; parent::beforeRender(); $bundleJs = $this->context->getParameters()['wwwDir'] . $file; $this->template->bundleJsVersion = file_exists($bundleJs) ? md5(file_get_contents($this->context->getParameters()['wwwDir'] . $file)) : "404"; }
public function startup() { parent::startup(); if (!$this->getRequest()->isMethod(Nette\Application\Request::FORWARD)) { $this->error(); } }
public function renderDefault($id) { parent::renderDefault($id); $this->template->current_category = $this->category->get($id); $this->template->title = 'Unread ' . $this->template->current_category->name; $this->template->articles = $this->article->category($id); }
protected function startup() { parent::startup(); if (!$this->user->isLoggedIn()) { $this->redirect('Login:'); } }
public function beforeRender() { parent::beforeRender(); $this->setActiveMenuItem('Eshop'); $this->setLayout('layoutEshop'); $this->template->eshopCategories = $this->categoryModel->findEshopCategories(); }
public function startup() { parent::startup(); // if (!$this->user->isLoggedIn()) { // $this->redirect('Sign:in'); // } }
public function startup() { parent::startup(); if (!$this->user->isAllowed('Admin', 'can')) { throw new \Nette\Application\ForbiddenRequestException(); } }
protected function startup() { parent::startup(); $this->oModel = $this->context->getService("article"); $this->oMenu = $this->context->getService("menu"); $this->oUser = $this->context->getService("userss"); }
protected function startup() { parent::startup(); if (!$this->user->loggedIn) { $this->redirect('Homepage:'); } }
public function startup() { parent::startup(); if ($this->user->loggedIn) { $this->redirect('Admin:directives'); } }
public function renderDefault() { CliLogger::log("\nSomething bad!\n", CliLogger::ERROR); if ($this->params["exception"]->getCode() == 404) { BasePresenter::Help(); } }
public function startup() { parent::startup(); // TODO: Change the autogenerated stub if (!$this->session->isStarted()) { $this->session->start(); } }
protected function startup() { parent::startup(); $parameters = $this->context->parameters; $this->appDir = $parameters['appDir']; $this->contactEmail = $parameters['contactEmail']; $this->registerFormExtendingMethods(); }
/** MapPresenter constructor*/ protected function startUp() { parent::startup(); if (!$this->user->isLoggedIn()) { $this->flashMessage('Pro přístup k mapám je nutné se přihlásit.', 'danger'); $this->redirect('Login:'); } }
protected function createTemplate() { $template = parent::createTemplate(); $template->addFilter('wikiname', function ($value) { return $this->wiki->getPageName($value); }); return $template; }
public function __construct(ShoppingCart $shoppingCart, IShoppingCartControlFactory $shoppingCartControlFactory, CurrencyConvertor $currencyConvertor, ISignRegisterControlFactory $srff, IOrderFormControlFactory $off) { parent::__construct($shoppingCart); $this->shoppingCartControlFactory = $shoppingCartControlFactory; $this->currencyConvertor = $currencyConvertor; $this->srff = $srff; $this->off = $off; }
public function startup() { parent::startup(); if (!$this->getUser()->isLoggedIn()) { $this->flashMessage("Pro vstup do této sekce je vyžadováno přihlášení."); $this->redirect(":Homepage:"); } }
public function __construct(AppManager $appManager, LabelsManager $labelsManager, GroupsManager $groupsManager, CommentsManager $commentsManager) { parent::__construct(); $this->appManager = $appManager; $this->labelsManager = $labelsManager; $this->groupsManager = $groupsManager; $this->commentsManager = $commentsManager; }
public function beforeRender() { parent::beforeRender(); $form = $this['loginForm']; if ($form->isSubmitted()) { $this->login($form, $form->getValues()); } }
public function startup() { parent::startup(); if (!$this->user->isInRole('admin')) { $this->flashMessage('Akci nelze provést, protože nemáte oprávnění administrátora. ' . 'Přihlaste se administrátorským účtem.', 'error'); $this->redirect("Sign:in", array('backlink' => $this->storeRequest())); } $this->formLatteAddress = __DIR__ . "/../templates/form.latte"; }
public function startup() { parent::startup(); if (!$this->user->isLoggedIn()) { $this->flashMessage("To access Steel, you must be Steel."); $this->redirect('Sign:in'); } $this->template->title = "Steelasdf"; }
public function startup() { parent::startup(); if ($this->user->isLoggedIn()) { if ($this->getParameter('id') != $this->user->getId()) { $this->redirect('Sign:in'); } } }
/** * Verify token. */ public function startup() { parent::startup(); $token = $this->getParameter('token'); if (!$this->usersRepository->verifyToken($token)) { $this->flashMessage('The token is invalid.', 'alert alert-danger'); $this->redirect('LogIn:default'); } }
protected function beforeRender() { parent::beforeRender(); $this->template->articleRepository = $this->articleRepository; $this->template->imageRepository = $this->imageRepository; $this->template->videoRepository = $this->videoRepository; $this->template->wikiRepository = $this->wikiRepository; $this->template->tagRepository = $this->tagRepository; $this->template->uploadDir = $this->context->parameters['uploadDir']; }
protected function startup() { parent::startup(); //.... // get settings $this->settings = $this->settingRepository->getSettings(); $arrsdfsdfsdf = ['AoAco' => 'asdas', 'naeco' => 'asdas', 'naecaovbnm' => 'asdas']; $arrr = ['a' => '4', 'b' => 'c']; $a = ['a' => 1]; }
public function startup() { parent::startup(); if (!$this->user->loggedIn) { $this->redirect("Sign:in", ["backlink" => $this->storeRequest()]); } $this->translator->setLocale("en"); if ($this->getParameter("no_layout", false)) { $this->setLayout(false); } }