當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Presenter::beforeRender方法代碼示例

本文整理匯總了PHP中Nette\Application\UI\Presenter::beforeRender方法的典型用法代碼示例。如果您正苦於以下問題:PHP Presenter::beforeRender方法的具體用法?PHP Presenter::beforeRender怎麽用?PHP Presenter::beforeRender使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Nette\Application\UI\Presenter的用法示例。


在下文中一共展示了Presenter::beforeRender方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: beforeRender

 protected function beforeRender()
 {
     parent::beforeRender();
     if ($this->isAjax() && $this->hasFlashSession()) {
         $this->redrawControl('flash');
     }
 }
開發者ID:jedenweb,項目名稱:framework,代碼行數:7,代碼來源:Presenter.php

示例2: beforeRender

 protected function beforeRender()
 {
     parent::beforeRender();
     // TODO add excaption when paramets[site] not exists
     $this->template->production = !$this->context->parameters['site']['develMode'];
     $this->template->version = $this->context->parameters['site']['version'];
 }
開發者ID:aprila,項目名稱:website,代碼行數:7,代碼來源:BasePresenter.php

示例3: beforeRender

 /**
  * @todo Language switch
  */
 public function beforeRender()
 {
     parent::beforeRender();
     if (file_exists(APP_DIR . '/data/en/cv.json')) {
         $this->data = json_decode(file_get_contents(APP_DIR . '/data/en/cv.json'), true);
     }
 }
開發者ID:brazvo,項目名稱:php-cv,代碼行數:10,代碼來源:CurriculumVitaePresenter.php

示例4: beforeRender

 /**
  * Common template method
  */
 protected function beforeRender()
 {
     parent::beforeRender();
     $this->template->portal = $this->portal;
     $this->template->rev = $this->portal->expand('build.rev');
     $this->template->debug = $this->portal->isDebug();
 }
開發者ID:milo,項目名稱:componette.com,代碼行數:10,代碼來源:BasePresenter.php

示例5: beforeRender

 public function beforeRender()
 {
     parent::beforeRender();
     $parameters = $this->context->parameters;
     $this->template->version = $parameters['version'];
     $this->template->debugMode = $parameters['debugMode'];
 }
開發者ID:fmasa,項目名稱:nette-boilerplate,代碼行數:7,代碼來源:BasePresenter.php

示例6: beforeRender

 public function beforeRender()
 {
     parent::beforeRender();
     if (!$this->getUser()->isLoggedIn()) {
         $this->redirectUrl('/');
     }
 }
開發者ID:kysela-petr,項目名稱:ErrorDiary,代碼行數:7,代碼來源:HomepagePresenter.php

示例7: beforeRender

 public function beforeRender()
 {
     parent::beforeRender();
     $this->template->locale = $this->locale;
     $this->template->production = !$this->siteLayout->develMode;
     $this->template->version = $this->siteLayout->versionName;
 }
開發者ID:JanTvrdik,項目名稱:planette,代碼行數:7,代碼來源:BasePresenter.php

示例8: beforeRender

 public function beforeRender()
 {
     parent::beforeRender();
     $this->template->projectName = $this->baseDataService->getProjectName();
     $this->template->categories = $this->categoryService->getRoot();
     $this->template->currentCategory = $this->currentCategory;
 }
開發者ID:shophp,項目名稱:shophp,代碼行數:7,代碼來源:BasePresenter.php

示例9: beforeRender

 protected function beforeRender()
 {
     parent::beforeRender();
     if ($this->isAjax) {
         $this->redrawControl('flashMessages');
     }
 }
開發者ID:leonardoca,項目名稱:nplayground,代碼行數:7,代碼來源:BasePresenter.php

示例10: beforeRender

 protected function beforeRender()
 {
     parent::beforeRender();
     $this->template->isLogged = $this->user->isLoggedIn();
     if ($this->template->isLogged) {
         $this->template->uzivatel = $this->user->getIdentity()->jmeno;
     }
 }
開發者ID:bkralik,項目名稱:BarakIS,代碼行數:8,代碼來源:BasePresenter.php

示例11: beforeRender

 public function beforeRender()
 {
     parent::beforeRender();
     $this->getTemplate()->footer = $this->footerRepository->get(1);
     $this->getTemplate()->theme = "themes/" . $this->settings['theme'];
     $this->getTemplate()->ajax = $this->getParameter('ajax') == 'on';
     $this->getTemplate()->settings = $this->settings;
 }
開發者ID:svatekr,項目名稱:rsrs,代碼行數:8,代碼來源:BasePresenter.php

示例12: beforeRender

 public function beforeRender()
 {
     parent::beforeRender();
     if ($this->isAjax()) {
         $this->redrawControl('title');
         $this->redrawControl('menu');
         $this->redrawControl('content');
     }
 }
開發者ID:myiyk,項目名稱:vote,代碼行數:9,代碼來源:BasePresenter.php

示例13: beforeRender

 public function beforeRender()
 {
     parent::beforeRender();
     $this->knowledgebase->setLanguage($this->language);
     $this->template->knowledgebase = $this->knowledgebase;
     $this->template->language = $this->language;
     $this->template->production = !$this->context->parameters['site']['develMode'];
     $this->template->version = $this->context->parameters['site']['version'];
 }
開發者ID:aprila,項目名稱:app-knowledge-base,代碼行數:9,代碼來源:BasePresenter.php

示例14: beforeRender

 protected function beforeRender()
 {
     parent::beforeRender();
     $user_id = $this->user->id;
     if ($this->user->isLoggedIn() and $user_id != NULL) {
         $css = $this->baseModel->getCss($user_id);
         $this->template->userCss = $css->style;
     } else {
         $this->template->userCss = 1;
     }
 }
開發者ID:norik16,項目名稱:TripMap,代碼行數:11,代碼來源:BasePresenter.php

示例15: beforeRender

 public function beforeRender()
 {
     parent::beforeRender();
     if ($this->getName() != 'Sign' and $this->getName() != 'Init') {
         if (!$this->storage->isInitialized()) {
             $this->redirect(302, 'Init:default');
         }
     }
     $this->template->loggedIn = $this->getUser()->isLoggedIn();
     $this->template->url = $this->context->httpRequest->getUrl()->getAbsoluteUrl();
     $this->template->presenter = $this->getName();
 }
開發者ID:xxdavid,項目名稱:texist,代碼行數:12,代碼來源:BasePresenter.php


注:本文中的Nette\Application\UI\Presenter::beforeRender方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。