当前位置: 首页>>代码示例>>PHP>>正文


PHP Presenter::startup方法代码示例

本文整理汇总了PHP中Nette\Application\UI\Presenter::startup方法的典型用法代码示例。如果您正苦于以下问题:PHP Presenter::startup方法的具体用法?PHP Presenter::startup怎么用?PHP Presenter::startup使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Nette\Application\UI\Presenter的用法示例。


在下文中一共展示了Presenter::startup方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: startup

 protected function startup()
 {
     parent::startup();
     if ($this->getParameter('debug', FALSE)) {
         \Nette\Diagnostics\Debugger::$productionMode = FALSE;
     }
 }
开发者ID:newPOPE,项目名称:web-addons.nette.org,代码行数:7,代码来源:BasePresenter.php

示例2: startup

 protected function startup()
 {
     parent::startup();
     $this->items = $this->context->createServiceFiles();
     $this->template->setFile('');
     // nebude shanet sablonu
 }
开发者ID:soundake,项目名称:pd,代码行数:7,代码来源:ImagePresenter.php

示例3: startup

 protected function startup()
 {
     parent::startup();
     if (!$this->type) {
         $this->type = key($this->securityManager->getUserTypes());
     }
 }
开发者ID:venne,项目名称:venne,代码行数:7,代码来源:DefaultPresenter.php

示例4: startup

 /**
  * startup method
  * @return void
  */
 public function startup()
 {
     parent::startup();
     $this->lang = $this->translator->setLanguage($this->lang);
     $this->user = $this->getUser();
     return;
 }
开发者ID:OCC2,项目名称:occ2pacs,代码行数:11,代码来源:AuthenticatorPresenter.php

示例5: startup

 protected function startup()
 {
     parent::startup();
     // Login check
     if ($this->getName() != 'Admin:Sign') {
         $role = $this->user->getRoles();
         $roleCheck = $this->database->table("users_roles")->get($role[0]);
         if ($roleCheck->admin_access == 0) {
             $this->flashMessage($this->translator->translate('messages.sign.invalidLogin'), "error");
             $this->redirect(':Admin:Sign:in');
         }
         if ($this->user->isLoggedIn()) {
         } else {
             if ($this->user->logoutReason === Nette\Security\IUserStorage::INACTIVITY) {
                 $this->flashMessage($this->translator->translate('messages.sign.youWereLoggedIn'), "note");
             }
             $this->redirect('Sign:in', array('backlink' => $this->storeRequest()));
         }
     }
     if ($this->user->isLoggedIn()) {
         $this->template->isLoggedIn = TRUE;
         $this->template->member = $this->database->table("users")->get($this->user->getId());
     }
     // Set values from db
     $this->template->settings = $this->database->table("settings")->fetchPairs("setkey", "setvalue");
     $this->template->appDir = APP_DIR;
     $this->template->signed = TRUE;
     $this->template->langSelected = $this->translator->getLocale();
     // Set language from cookie
     if ($this->context->httpRequest->getCookie('language_admin') == '') {
         $this->translator->setLocale($this->translator->getDefaultLocale());
     } else {
         $this->translator->setLocale($this->context->httpRequest->getCookie('language_admin'));
     }
 }
开发者ID:caloriscz,项目名称:caloriscms,代码行数:35,代码来源:BasePresenter.php

示例6: startup

 protected function startup()
 {
     parent::startup();
     $this->template->page = $this->getName();
     $this->template->cartCount = 1;
     $this->template->cartPrice = 3600;
 }
开发者ID:kudlav,项目名称:matura-vk,代码行数:7,代码来源:BasePresenter.php

示例7: startup

 protected function startup()
 {
     parent::startup();
     if (!$this->getUser()->isLoggedIn()) {
         //throw new BadRequestException;
     }
 }
开发者ID:pogodi,项目名称:Brain,代码行数:7,代码来源:BasePresenter.php

示例8: startup

 protected function startup()
 {
     parent::startup();
     if ($this->authentication->getCredential() !== substr($this->httpRequest->getHeader('authorization'), 6)) {
         //throw new AuthenticationException();
     }
 }
开发者ID:pogodi,项目名称:OCApi,代码行数:7,代码来源:BasePresenter.php

示例9: startup

 function startup()
 {
     parent::startup();
     if (isset($this->module)) {
         Options::extend($this->module, $this->moduleparams);
         Options::read($this->params);
     }
     if (array_key_exists("conffile", $this->params)) {
         Options::read(array("conffile" => $this->params["conffile"]));
     } else {
         if (getenv("MONDARC")) {
             Options::readFile(getenv("MONDARC"));
         }
     }
     Options::readEnv();
     Options::read($this->params);
     if (Options::get("configinfo")) {
         foreach (Options::get() as $key => $val) {
             $arr = Options::info($key);
             if ($arr["default"]) {
                 CliLogger::log(sprintf("Option %s => Value:'%s', set from:defaults\n", $key, $arr["value"]), Debugger::ERROR);
             } else {
                 CliLogger::log(sprintf("Option %s => Value:'%s', set from:%s\n", $key, $arr["value"], $arr["setfrom"]), Debugger::ERROR);
             }
         }
         self::mexit();
     }
     if ($this->name == $this->action) {
         $this->Help(Options::get("xhelp"));
     }
 }
开发者ID:jiang51,项目名称:monda,代码行数:31,代码来源:BasePresenter.php

示例10: startup

 public function startup()
 {
     parent::startup();
     if (!$this->getRequest()->isMethod(Nette\Application\Request::FORWARD)) {
         $this->error();
     }
 }
开发者ID:fuchcz,项目名称:generator-myproject,代码行数:7,代码来源:Error4xxPresenter.php

示例11: startup

 /**
  * @throws \LiveTranslator\TranslatorException
  */
 public function startup()
 {
     parent::startup();
     if ($this->user->isLoggedIn()) {
         //$this->usermanager->lastLogged($this->user->id);
     }
 }
开发者ID:buffus,项目名称:skeleton,代码行数:10,代码来源:BasePresenter.php

示例12: startup

 public function startup()
 {
     parent::startup();
     if (!in_array($this->locale, array('cs', 'en'))) {
         $this->redirect('this', array('locale' => 'en'));
     }
 }
开发者ID:myiyk,项目名称:vote,代码行数:7,代码来源:BasePresenter.php

示例13: startup

 public function startup()
 {
     parent::startup();
     $this->template->max_rating = $this->global_settings->getMaxRating();
     $this->template->image_dir = __DIR__ . '/../../www/images/games/';
     $this->template->title = '';
 }
开发者ID:Thoronir42,项目名称:G-archive,代码行数:7,代码来源:BasePresenter.php

示例14: startup

 protected function startup()
 {
     parent::startup();
     if (!$this->user->isLoggedIn()) {
         $this->redirect('Sign:in', array('backlink' => $this->storeRequest()));
     }
 }
开发者ID:04EO,项目名称:TrainingTaskNette,代码行数:7,代码来源:BasePresenter.php

示例15: startup

 protected function startup()
 {
     parent::startup();
     if (!$this->user->isLoggedIn() && $this->name != "Sign") {
         $this->redirect("Sign:in");
     }
 }
开发者ID:batko,项目名称:batkovi.com,代码行数:7,代码来源:BasePresenter.php


注:本文中的Nette\Application\UI\Presenter::startup方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。