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


PHP Kurogo::getSiteConfig方法代码示例

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


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

示例1: removeFromHomeScreen

 public function removeFromHomeScreen()
 {
     $config = Kurogo::getSiteConfig('navigation', 'site');
     $config->removeSection($this->configModule);
     Kurogo::sharedInstance()->saveConfig($config);
 }
开发者ID:sponto,项目名称:msbm-mobile,代码行数:6,代码来源:WebModule.php

示例2: themeConfig

 public function themeConfig()
 {
     if (!$this->themeConfig) {
         $this->themeConfig = new ConfigGroup('theme', 'site');
         if ($config = Kurogo::getSiteConfig('theme')) {
             $this->themeConfig->addConfig($config);
         }
         if ($this->configModule) {
             if ($config = Kurogo::getModuleConfig('theme', $this->module, Config::OPTION_DO_NOT_CREATE)) {
                 $this->themeConfig->addConfig($config);
             }
         }
     }
     return $this->themeConfig;
 }
开发者ID:sponto,项目名称:Kurogo-Mobile-Web,代码行数:15,代码来源:Kurogo.php

示例3: initializeForCommand


//.........这里部分代码省略.........
                             $config->removeSection($key);
                         }
                     }
                     // ignore prefix values. We'll put it back together later
                     if (preg_match("/^(.*?)_prefix\$/", $key, $bits)) {
                         continue;
                     }
                     $prefix = isset($fields[$key . '_prefix']) ? $fields[$key . '_prefix'] : '';
                     if ($prefix && defined($prefix)) {
                         $value = constant($prefix) . '/' . $value;
                     }
                     $this->setConfigVar($type, $section, $subsection, $key, $value);
                 }
             }
             if ($sectionorder = $this->getArg('sectionorder')) {
                 foreach ($sectionorder as $section => $order) {
                     $this->setSectionOrder($type, $section, $subsection, $order);
                 }
             }
             foreach ($this->changedConfigs as $config) {
                 Kurogo::sharedInstance()->saveConfig($config);
             }
             $this->setResponse(true);
             $this->setResponseVersion(1);
             break;
         case 'removeconfigsection':
             $type = $this->getArg('type');
             $section = $this->getArg('section', '');
             $key = $this->getArg('key', null);
             switch ($type) {
                 case 'site':
                     $subsection = $this->getArg('subsection', null);
                     $sectionData = $this->getAdminData($type, $section, $subsection);
                     $config = Kurogo::getSiteConfig($sectionData['config'], 'site');
                     break;
                 case 'module':
                     $moduleID = $this->getArg('module', '');
                     $module = WebModule::factory($moduleID);
                     $sectionData = $this->getAdminData($module, $section);
                     $config = Kurogo::getModuleConfig($sectionData['config'], $moduleID);
                     $subsection = $moduleID;
                     break;
                 default:
                     throw new KurogoConfigurationException(__LINE__ . ": Invalid type {$type}");
             }
             if (!isset($sectionData['sections']) || (!isset($sectionData['sectiondelete']) || !$sectionData['sectiondelete'])) {
                 throw new KurogoConfigurationException(__LINE__ . ": Section '{$section}' does not permit removal of items");
             }
             if (!isset($sectionData['sections'][$key])) {
                 throw new KurogoConfigurationException(__LINE__ . ": Section {$key} not found in config '{$section}' of {$type} {$subsection}");
             }
             Kurogo::log(LOG_NOTICE, "Removing section {$key} from {$type} {$section} {$subsection}", 'admin');
             if (!($result = $config->removeSection($key))) {
                 throw new KurogoException(__LINE__ . ": Error removing item {$key} from config '" . $sectionData['config'] . "'");
             } else {
                 Kurogo::sharedInstance()->saveConfig($config);
             }
             $this->setResponse(true);
             $this->setResponseVersion(1);
             break;
         case 'addNewModule':
             $moduleData = $this->getArg('newModule');
             $module = $this->addNewModule($moduleData);
             $this->setResponseVersion(1);
             $this->setResponse(true);
             break;
开发者ID:sponto,项目名称:msbm-mobile,代码行数:67,代码来源:AdminAPIModule.php


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