當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。