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


PHP ZurmoConfigurationUtil::getByUserAndModuleName方法代码示例

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


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

示例1: resolveAndGetBackgroundTextureValue

 public function resolveAndGetBackgroundTextureValue(User $user)
 {
     assert('$user instanceOf User && $user->id > 0');
     if (null != ($themeColor = ZurmoConfigurationUtil::getByUserAndModuleName($user, 'ZurmoModule', 'backgroundTexture'))) {
         return $themeColor;
     } else {
         return null;
     }
 }
开发者ID:youprofit,项目名称:Zurmo,代码行数:9,代码来源:ThemeManager.php

示例2: getForCurrentUserByModuleName

 /**
  * For the current user, retrieve a configuration value by module name and key.
  * @return configuration value of specified key
  */
 public static function getForCurrentUserByModuleName($moduleName, $key)
 {
     assert('is_string($moduleName)');
     assert('is_string($key)');
     assert('Yii::app()->user->userModel == null || Yii::app()->user->userModel->id > 0');
     if (!Yii::app()->user->userModel instanceof User) {
         return null;
     }
     return ZurmoConfigurationUtil::getByUserAndModuleName(Yii::app()->user->userModel, $moduleName, $key);
 }
开发者ID:youprofit,项目名称:Zurmo,代码行数:14,代码来源:ZurmoConfigurationUtil.php

示例3: getRecentlyViewedByUser

 /**
  * Given an user, get the recently viewed moduleClassName and modelId limited by count
  * @param User $user
  * @param integer $count
  * @return array($moduleClassName, $modelId)
  */
 protected static function getRecentlyViewedByUser(User $user, $count)
 {
     assert('is_int($count)');
     $recentlyViewed = unserialize(ZurmoConfigurationUtil::getByUserAndModuleName($user, 'ZurmoModule', 'recentlyViewed'));
     if (!is_array($recentlyViewed)) {
         return array();
     }
     return array_slice($recentlyViewed, 0, $count);
 }
开发者ID:RamaKavanan,项目名称:InitialVersion,代码行数:15,代码来源:AuditEventsRecentlyViewedUtil.php

示例4: resolveAndGetDefaultPermissionSetting

 /**
  * @param User $user
  * @return configuration
  */
 public static function resolveAndGetDefaultPermissionSetting(User $user)
 {
     assert('$user instanceOf User && $user->id > 0');
     if (null != ($defaultPermission = ZurmoConfigurationUtil::getByUserAndModuleName($user, 'ZurmoModule', 'defaultPermissionSetting'))) {
         return $defaultPermission;
     } else {
         return UserConfigurationForm::DEFAULT_PERMISSIONS_SETTING_EVERYONE;
     }
 }
开发者ID:RamaKavanan,项目名称:InitialVersion,代码行数:13,代码来源:UserConfigurationFormAdapter.php

示例5: getCustomVisibleAndOrderedTabMenuItemsByUser

 /**
  * @param $user
  * @return array
  */
 public static function getCustomVisibleAndOrderedTabMenuItemsByUser($user)
 {
     $tabMenuItems = array();
     if (!null == ZurmoConfigurationUtil::getByUserAndModuleName($user, 'ZurmoModule', 'VisibleAndOrderedTabMenuItems')) {
         $customOrderedTabMenuItems = unserialize(ZurmoConfigurationUtil::getByUserAndModuleName($user, 'ZurmoModule', 'VisibleAndOrderedTabMenuItems'));
         foreach ($customOrderedTabMenuItems as $moduleId) {
             $tabMenuItems[$moduleId] = "";
         }
     }
     return $tabMenuItems;
 }
开发者ID:RamaKavanan,项目名称:InitialVersion,代码行数:15,代码来源:MenuUtil.php

示例6: getByUserAndType

 /**
  * Get the pagination value for the specified user by pagination type.
  * @param $user - user model
  * @param $type - pagination type
  * @param $moduleName - optional. Module class name.
  * @return $pageSize - integer.
  */
 public function getByUserAndType($user, $type, $moduleName = null)
 {
     assert('$user instanceOf User && $user->id > 0');
     assert('in_array($type, static::getAvailablePageSizeNames()) == true');
     assert('$moduleName == null || is_string($moduleName)');
     $keyName = $this->getKeyByTypeAndModuleName($type);
     if (null != ($pageSize = ZurmoConfigurationUtil::getByUserAndModuleName($user, 'ZurmoModule', $keyName))) {
         return $pageSize;
     }
     return $this->{'_' . $type};
 }
开发者ID:RamaKavanan,项目名称:InitialVersion,代码行数:18,代码来源:ZurmoPaginationHelper.php

示例7: getCalendarItemsDataProvider

 /**
  * Get calendar items data provider.
  * @param User $user
  * @return CalendarItemsDataProvider
  */
 public static function getCalendarItemsDataProvider(User $user)
 {
     $mySavedCalendarIds = ZurmoConfigurationUtil::getByUserAndModuleName($user, 'CalendarsModule', 'myCalendarSelections');
     $mySubscribedCalendarIds = ZurmoConfigurationUtil::getByUserAndModuleName($user, 'CalendarsModule', 'mySubscribedCalendarSelections');
     $dateRangeType = ZurmoConfigurationUtil::getByUserAndModuleName($user, 'CalendarsModule', 'myCalendarDateRangeType');
     $startDate = ZurmoConfigurationUtil::getByUserAndModuleName($user, 'CalendarsModule', 'myCalendarStartDate');
     $endDate = ZurmoConfigurationUtil::getByUserAndModuleName($user, 'CalendarsModule', 'myCalendarEndDate');
     return CalendarUtil::processUserCalendarsAndMakeDataProviderForCombinedView($mySavedCalendarIds, $mySubscribedCalendarIds, $dateRangeType, $startDate, $endDate);
 }
开发者ID:maruthisivaprasad,项目名称:zurmo,代码行数:14,代码来源:CalendarUtil.php

示例8: resolveAndGetSelectedTheme

 /**
  * @return configuration|null
  * if selected theme exists in database, return that, else return default theme
  */
 protected function resolveAndGetSelectedTheme()
 {
     $user = Yii::app()->user->userModel;
     $modelName = get_class($this->model);
     $key = $this->getSelectedThemeKeyByModelName($modelName);
     if (null != ($theme = ZurmoConfigurationUtil::getByUserAndModuleName($user, 'ZurmoModule', $key))) {
         $this->selectedTheme = $theme;
     } else {
         $this->selectedTheme = $this->getDefaultTheme();
     }
     return $this->selectedTheme;
 }
开发者ID:RamaKavanan,项目名称:InitialVersion,代码行数:16,代码来源:KanbanBoard.php

示例9: resolveAndGetValue

 public static function resolveAndGetValue(User $user, $key, $returnBoolean = true)
 {
     assert('$user instanceOf User && $user->id > 0');
     assert('is_string($key)');
     assert('is_bool($returnBoolean)');
     $value = ZurmoConfigurationUtil::getByUserAndModuleName($user, 'ZurmoModule', $key);
     return $returnBoolean ? (bool) $value : $value;
 }
开发者ID:RamaKavanan,项目名称:InitialVersion,代码行数:8,代码来源:UserNotificationUtil.php


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