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


PHP Kurogo::getLocalizedStrings方法代码示例

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


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

示例1: setPageVariables


//.........这里部分代码省略.........
             Kurogo::log(LOG_DEBUG, "Returned from initializeForPage for {$this->configModule} - {$this->page}", 'module');
         }
     }
     // Set variables for each page
     $this->assign('pageTitle', $this->pageTitle);
     // Variables which may have been modified by the module subclass
     $this->assign('inlineCSSBlocks', $this->inlineCSSBlocks);
     $this->assign('cssURLs', $this->cssURLs);
     $this->assign('inlineJavascriptBlocks', $this->inlineJavascriptBlocks);
     $this->assign('onOrientationChangeBlocks', $this->onOrientationChangeBlocks);
     $this->assign('onLoadBlocks', $this->onLoadBlocks);
     $this->assign('inlineJavascriptFooterBlocks', $this->inlineJavascriptFooterBlocks);
     $this->assign('javascriptURLs', $this->javascriptURLs);
     $this->assign('breadcrumbs', $this->breadcrumbs);
     $this->assign('breadcrumbArgs', $this->getBreadcrumbArgs());
     $this->assign('breadcrumbSamePageArgs', $this->getBreadcrumbArgs(false));
     $this->assign('moduleDebugStrings', $this->moduleDebugStrings);
     $this->assign('webBridgeOnPageLoadParams', KurogoWebBridge::getOnPageLoadParams($this->pageTitle, $this->breadcrumbTitle, $this->hasWebBridgePageRefresh));
     $this->assign('webBridgeConfig', KurogoWebBridge::getServerConfig($this->configModule, $this->page, $this->args));
     $moduleStrings = $this->getOptionalModuleSection('strings');
     $this->assign('moduleStrings', $moduleStrings);
     $this->assign('homeLink', $this->buildURLForModule($this->getHomeModuleID(), '', array()));
     $this->assign('homeModuleID', $this->getHomeModuleID());
     $this->assignLocalizedStrings();
     if ($this->page == 'help') {
         // Module Help
         $this->assign('hasHelp', false);
         $template = 'common/templates/' . $this->page;
     } else {
         if ($this->page == '__nativeWebTemplates') {
             $template = 'common/templates/staticContent';
         } else {
             if (KurogoWebBridge::useWrapperPageTemplate()) {
                 // Web bridge page wrapper
                 $template = 'common/templates/webBridge';
                 $this->assign('webBridgeJSLocalizedStrings', json_encode(Kurogo::getLocalizedStrings()));
             } else {
                 $this->assign('hasHelp', isset($moduleStrings['help']));
                 $this->assign('helpLink', $this->buildBreadcrumbURL('help', array()));
                 $this->assign('helpLinkText', $this->getLocalizedString('HELP_TEXT', $this->getModuleName()));
                 $template = 'modules/' . $this->templateModule . '/templates/' . $this->templatePage;
             }
         }
     }
     Kurogo::log(LOG_DEBUG, "Template file is {$template}", 'module');
     // Pager support
     if (isset($this->htmlPager)) {
         $this->assign('pager', $this->getPager());
     }
     // Tab support
     if (isset($this->tabbedView)) {
         $this->assign('tabbedView', $this->tabbedView);
     }
     $this->assign('imageExt', $this->imageExt);
     $this->assign($this->getThemeVars());
     // Access Key Start
     $accessKeyStart = count($this->breadcrumbs);
     if ($this->configModule != $this->getHomeModuleID()) {
         $accessKeyStart++;
         // Home link
     }
     $this->assign('accessKeyStart', $accessKeyStart);
     if (Kurogo::getSiteVar('AUTHENTICATION_ENABLED')) {
         Kurogo::includePackage('Authentication');
         $this->setCacheMaxAge(0);
         $session = $this->getSession();
         $this->assign('session', $session);
         $this->assign('session_isLoggedIn', $this->isLoggedIn());
         $this->assign('showLogin', Kurogo::getSiteVar('AUTHENTICATION_ENABLED') && $this->showLogin());
         if ($this->isLoggedIn()) {
             $user = $session->getUser();
             $authority = $user->getAuthenticationAuthority();
             $this->assign('session_userID', $user->getUserID());
             $this->assign('session_fullName', $user->getFullname());
             if (count($session->getUsers()) == 1) {
                 $this->assign('session_logout_url', $this->buildURLForModule($this->getLoginModuleID(), 'logout', array('authority' => $user->getAuthenticationAuthorityIndex())));
                 $this->assign('footerLoginLink', $this->buildURLForModule($this->getLoginModuleID(), '', array()));
                 $this->assign('footerLoginText', $this->getLocalizedString('SIGNED_IN_SINGLE', $authority->getAuthorityTitle(), $user->getFullName()));
                 $this->assign('footerLoginClass', $authority->getAuthorityClass());
             } else {
                 $this->assign('footerLoginClass', 'login_multiple');
                 $this->assign('session_logout_url', $this->buildURLForModule($this->getLoginModuleID(), 'logout', array()));
                 $this->assign('footerLoginLink', $this->buildURLForModule($this->getLoginModuleID(), 'logout', array()));
                 $this->assign('footerLoginText', $this->getLocalizedString('SIGNED_IN_MULTIPLE'));
             }
             if ($session_max_idle = intval(Kurogo::getOptionalSiteVar('AUTHENTICATION_IDLE_TIMEOUT', 0))) {
                 $this->setRefresh($session_max_idle + 2);
             }
         } else {
             $this->assign('footerLoginClass', 'noauth');
             $this->assign('footerLoginLink', $this->buildURLForModule($this->getLoginModuleID(), '', array()));
             $this->assign('footerLoginText', $this->getLocalizedString('SIGN_IN_SITE', Kurogo::getSiteString('SITE_NAME')));
         }
     }
     /* set cache age. Modules that present content that rarely changes can set this value
        to something higher */
     header(sprintf("Cache-Control: max-age=%d", $this->cacheMaxAge));
     header("Expires: " . gmdate('D, d M Y H:i:s', time() + $this->cacheMaxAge) . ' GMT');
     return $template;
 }
开发者ID:rolandinsh,项目名称:Kurogo-Mobile-Web,代码行数:101,代码来源:WebModule.php

示例2: setPageVariables


//.........这里部分代码省略.........
     if (Kurogo::getSiteVar('MODULE_DEBUG')) {
         $this->addModuleDebugString('Config Mode', implode(', ', Kurogo::sharedInstance()->getConfigModes()));
         $this->addModuleDebugString('Version', KUROGO_VERSION);
         if (SITE_VERSION) {
             $this->addModuleDebugString('Site Version', SITE_VERSION);
         }
         if (SITE_BUILD) {
             $this->addModuleDebugString('Site Build', SITE_BUILD);
         }
         if ($contexts = Kurogo::sharedInstance()->getActiveContexts()) {
             $this->addModuleDebugString('Context(s)', implode(', ', $contexts));
         }
         $this->assign('moduleDebugStrings', $this->moduleDebugStrings);
     }
     $this->assign('webBridgeOnPageLoadParams', KurogoWebBridge::getOnPageLoadParams($this->pageTitle, $this->breadcrumbTitle, $this->hasWebBridgePageRefresh, $this->hasWebBridgeAutoRefresh));
     $this->assign('webBridgeOnPageLoadConfig', KurogoWebBridge::getOnPageLoadConfig());
     $this->assign('webBridgeConfig', KurogoWebBridge::getServerConfig($this->configModule, $this->page, $this->args));
     $moduleStrings = $this->getOptionalModuleSection('strings');
     $this->assign('moduleStrings', $moduleStrings);
     $this->assign('homeLink', $this->buildURLForModule($this->getHomeModuleID(), '', array()));
     $this->assign('homeModuleID', $this->getHomeModuleID());
     $this->assignLocalizedStrings();
     if ($this->page == 'help') {
         // Module Help
         $this->assign('hasHelp', false);
         $template = 'common/templates/' . $this->page;
     } else {
         if ($this->page == self::WEB_BRIDGE_BUILD_TEMPLATES_PAGE) {
             $template = 'common/templates/staticContent';
         } else {
             if (KurogoWebBridge::useWrapperPageTemplate()) {
                 // Web bridge page wrapper
                 $template = 'common/templates/webBridge';
                 $this->assign('webBridgeJSLocalizedStrings', json_encode(Kurogo::getLocalizedStrings()));
             } else {
                 $this->assign('hasHelp', isset($moduleStrings['help']));
                 $this->assign('helpLink', $this->buildBreadcrumbURL('help', array()));
                 $this->assign('helpLinkText', $this->getLocalizedString('HELP_TEXT', $this->getModuleName()));
                 $template = 'modules/' . $this->templateModule . '/templates/' . $this->templatePage;
             }
         }
     }
     Kurogo::log(LOG_DEBUG, "Template file is {$template}", 'module');
     // Pager support
     if (isset($this->htmlPager)) {
         $this->assign('pager', $this->getPager());
     }
     // Tab support
     if (isset($this->tabbedView)) {
         $this->assign('tabbedView', $this->tabbedView);
     }
     $this->assign('imageExt', $this->imageExt);
     $this->assign(Kurogo::getThemeVars());
     // Access Key Start
     $accessKeyStart = count($this->breadcrumbs);
     if ($this->configModule != $this->getHomeModuleID()) {
         $accessKeyStart++;
         // Home link
     }
     $this->assign('accessKeyStart', $accessKeyStart);
     if (Kurogo::getSiteVar('AUTHENTICATION_ENABLED')) {
         Kurogo::includePackage('Authentication');
         $this->setCacheMaxAge(0);
         $session = $this->getSession();
         $this->assign('session', $session);
         $this->assign('session_isLoggedIn', $this->isLoggedIn());
开发者ID:sponto,项目名称:msbm-mobile,代码行数:67,代码来源:WebModule.php


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