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


PHP BizSystem::getUserPreference方法代码示例

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


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

示例1: getCurrentTheme

 public static function getCurrentTheme()
 {
     if (Resource::$_currentTheme != null) {
         return Resource::$_currentTheme;
     }
     $currentTheme = "";
     if (isset($_GET['theme'])) {
         $currentTheme = $_GET['theme'];
     }
     if ($currentTheme == "") {
         $currentTheme = BizSystem::sessionContext()->getVar("THEME");
     }
     if ($currentTheme == "") {
         $currentTheme = BizSystem::getUserPreference("theme");
     }
     if ($currentTheme == "" && defined('THEME_NAME')) {
         $currentTheme = THEME_NAME;
     }
     if ($currentTheme == "") {
         $currentTheme = Resource::DEFAULT_THEME;
     }
     // TODO: user pereference has language setting
     BizSystem::sessionContext()->setVar("THEME", $currentTheme);
     Resource::$_currentTheme = $currentTheme;
     return $currentTheme;
 }
开发者ID:Why-Not-Sky,项目名称:cubi-ng,代码行数:26,代码来源:Resource.php

示例2: getDefaultPerm

 public static function getDefaultPerm($group)
 {
     $group = strtolower($group);
     switch ($group) {
         default:
         case 'owner':
             $setting = BizSystem::getUserPreference('owner_perm');
             if ($setting != '') {
                 $perm_code = $setting;
             } else {
                 $perm_code = DEFAULT_OWNER_PERM;
             }
             break;
         case 'group':
             $setting = BizSystem::getUserPreference('owner_group');
             if ($setting != '') {
                 $perm_code = $setting;
             } else {
                 $perm_code = DEFAULT_GROUP_PERM;
             }
             break;
         case 'other':
             $setting = BizSystem::getUserPreference('owner_other');
             if ($setting != '') {
                 $perm_code = $setting;
             } else {
                 $perm_code = DEFAULT_OTHER_PERM;
             }
             break;
     }
     return $perm_code;
 }
开发者ID:Why-Not-Sky,项目名称:cubi-ng,代码行数:32,代码来源:BizSystem.php

示例3: getCurrentLangCode

 public static function getCurrentLangCode()
 {
     if (I18n::$_langCode != null) {
         return I18n::$_langCode;
     }
     $currentLanguage = BizSystem::sessionContext()->getVar("LANG");
     // default language
     if ($currentLanguage == "") {
         $currentLanguage = BizSystem::getUserPreference("language");
     }
     if ($currentLanguage == "") {
         $currentLanguage = I18n::DEFAULT_LANGUAGE;
     }
     // language from url
     if (isset($_GET['lang'])) {
         $currentLanguage = $_GET['lang'];
         BizSystem::sessionContext()->setVar("LANG", $currentLanguage);
     }
     // TODO: user pereference has language setting
     BizSystem::sessionContext()->setVar("LANG", $currentLanguage);
     I18n::$_langCode = $currentLanguage;
     return $currentLanguage;
 }
开发者ID:Why-Not-Sky,项目名称:cubi-ng,代码行数:23,代码来源:I18n.php


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