本文整理汇总了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');
}
}
示例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'];
}
示例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);
}
}
示例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();
}
示例5: beforeRender
public function beforeRender()
{
parent::beforeRender();
$parameters = $this->context->parameters;
$this->template->version = $parameters['version'];
$this->template->debugMode = $parameters['debugMode'];
}
示例6: beforeRender
public function beforeRender()
{
parent::beforeRender();
if (!$this->getUser()->isLoggedIn()) {
$this->redirectUrl('/');
}
}
示例7: beforeRender
public function beforeRender()
{
parent::beforeRender();
$this->template->locale = $this->locale;
$this->template->production = !$this->siteLayout->develMode;
$this->template->version = $this->siteLayout->versionName;
}
示例8: beforeRender
public function beforeRender()
{
parent::beforeRender();
$this->template->projectName = $this->baseDataService->getProjectName();
$this->template->categories = $this->categoryService->getRoot();
$this->template->currentCategory = $this->currentCategory;
}
示例9: beforeRender
protected function beforeRender()
{
parent::beforeRender();
if ($this->isAjax) {
$this->redrawControl('flashMessages');
}
}
示例10: beforeRender
protected function beforeRender()
{
parent::beforeRender();
$this->template->isLogged = $this->user->isLoggedIn();
if ($this->template->isLogged) {
$this->template->uzivatel = $this->user->getIdentity()->jmeno;
}
}
示例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;
}
示例12: beforeRender
public function beforeRender()
{
parent::beforeRender();
if ($this->isAjax()) {
$this->redrawControl('title');
$this->redrawControl('menu');
$this->redrawControl('content');
}
}
示例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'];
}
示例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;
}
}
示例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();
}