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


PHP Kurogo::getOptionalModuleVar方法代码示例

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


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

示例1: initializeForPage

 protected function initializeForPage()
 {
     //get links from module.ini [links]
     $links = $this->getOptionalModuleSection('links');
     $this->assign('links', $links);
     //get app Data
     $appData = Kurogo::getAppData();
     $this->assign('appData', $appData);
     //get module data from modules.ini
     $modulesData = $this->getOptionalModuleSections('modules');
     foreach ($modulesData as $moduleID => &$moduleData) {
         $moduleData['icon'] = Kurogo::getOptionalModuleVar('icon', $moduleID, $moduleID, 'module', 'module');
     }
     $this->assign('modulesData', $modulesData);
     $args = array();
     if (Kurogo::getSiteVar('COMPUTER_TABLET_ENABLED', 'themes')) {
         $args['setdevice'] = 'compliant';
     }
     $previewURL = $this->buildURLForModule($this->getHomeModuleID(), 'index', $args);
     $this->assign('previewURL', $previewURL);
 }
开发者ID:sponto,项目名称:Kurogo-Mobile-Web,代码行数:21,代码来源:InfoWebModule.php

示例2: getParentModuleID

 public static function getParentModuleID($moduleID)
 {
     return Kurogo::getOptionalModuleVar('id', $moduleID, $moduleID, 'module', 'module');
 }
开发者ID:sponto,项目名称:Kurogo-Mobile-Web,代码行数:4,代码来源:Module.php

示例3: setPageVariables

 private function setPageVariables()
 {
     $this->loadTemplateEngineIfNeeded();
     $this->loadPageConfig();
     // Set variables common to all modules
     $this->assign('moduleID', $this->id);
     $this->assign('configModule', $this->configModule);
     $this->assign('templateModule', $this->templateModule);
     $this->assign('moduleName', $this->moduleName);
     $this->assign('navImageID', $this->getModuleIcon());
     $this->assign('page', $this->page);
     $this->assign('isModuleHome', $this->page == 'index');
     $this->assign('request_uri', $_SERVER['REQUEST_URI']);
     $this->assign('hideFooterLinks', $this->hideFooterLinks);
     $this->assign('ajaxContentLoad', $this->ajaxContentLoad);
     $this->assign('charset', Kurogo::getCharset());
     $this->assign('http_protocol', HTTP_PROTOCOL);
     $this->assign('webBridgeAjaxContentLoad', KurogoWebBridge::isAjaxContentLoad());
     // Font size for template
     $this->assign('fontsizes', $this->fontsizes);
     $this->assign('fontsize', $this->fontsize);
     $this->assign('fontsizeCSS', $this->getFontSizeCSS());
     $this->assign('fontSizeURLs', $this->getFontSizeURLs());
     // Minify URLs
     $this->assign('minify', $this->getMinifyUrls());
     // Google Analytics. This probably needs to be moved
     if ($gaID = Kurogo::getOptionalSiteVar('GOOGLE_ANALYTICS_ID')) {
         $this->assign('GOOGLE_ANALYTICS_ID', $gaID);
         $this->assign('GOOGLE_ANALYTICS_DOMAIN', Kurogo::getOptionalSiteVar('GOOGLE_ANALYTICS_DOMAIN'));
         $this->assign('gaImageURL', $this->googleAnalyticsGetImageUrl($gaID));
     }
     // Breadcrumbs
     $this->loadBreadcrumbs();
     // Tablet iScroll
     if ($this->pagetype == 'tablet') {
         $this->addInternalJavascript('/common/javascript/lib/iscroll-4.2.js');
         // Module nav list
         if ($this->shouldShowNavigation()) {
             $this->assign('navigationModules', $this->getModuleNavlist());
             $allowCustomize = Kurogo::getOptionalModuleVar('ALLOW_CUSTOMIZE', true, $this->getHomeModuleID());
             $this->assignUserContexts($allowCustomize);
         }
     }
     if ($this->page == self::WEB_BRIDGE_BUILD_TEMPLATES_PAGE) {
         $title = 'Error!';
         $message = '';
         try {
             if (!Kurogo::isLocalhost()) {
                 throw new KurogoException("{$this->page} command can only be run from localhost");
             }
             $platforms = array_filter(array_map('trim', explode(',', $this->getArg('platform', ''))));
             if (!$platforms) {
                 throw new KurogoException("No platforms specified");
             }
             foreach ($platforms as $platform) {
                 $this->buildNativeWebTemplatesForPlatform($platform);
             }
             $title = 'Success!';
             $message = 'Generated native web templates for ' . implode(' and ', $platforms);
         } catch (Exception $e) {
             $message = $e->getMessage();
         }
         $this->assign('contentTitle', $title);
         $this->assign('contentBody', $message);
     } else {
         if (KurogoWebBridge::useNativeTemplatePageInitializer()) {
             Kurogo::log(LOG_DEBUG, "Calling initializeForNativeTemplatePage for {$this->configModule} - {$this->page}", 'module');
             $this->initializeForNativeTemplatePage();
             //subclass behavior
             Kurogo::log(LOG_DEBUG, "Returned from initializeForNativeTemplatePage for {$this->configModule} - {$this->page}", 'module');
         } else {
             Kurogo::log(LOG_DEBUG, "Calling initializeForPage for {$this->configModule} - {$this->page}", 'module');
             $this->initializeForPage();
             //subclass behavior
             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('breadcrumbsShowAll', $this->getOptionalThemeVar('breadcrumbs_show', true));
     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);
         }
//.........这里部分代码省略.........
开发者ID:sponto,项目名称:msbm-mobile,代码行数:101,代码来源:WebModule.php


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