当前位置: 首页>>代码示例>>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;未经允许,请勿转载。