本文整理汇总了PHP中erLhcoreClassModelUserSetting::getSetting方法的典型用法代码示例。如果您正苦于以下问题:PHP erLhcoreClassModelUserSetting::getSetting方法的具体用法?PHP erLhcoreClassModelUserSetting::getSetting怎么用?PHP erLhcoreClassModelUserSetting::getSetting使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类erLhcoreClassModelUserSetting
的用法示例。
在下文中一共展示了erLhcoreClassModelUserSetting::getSetting方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getDirLanguage
/**
* This function should be used then value can be override by siteAccess
* or user language has influence to returned value
*
* */
public function getDirLanguage($attribute = 'dir_language')
{
$value = null;
if ($this->hasSetting('site', $attribute)) {
$value = $this->getSetting('site', $attribute);
}
$siteAccess = erLhcoreClassSystem::instance()->SiteAccess;
if ($siteAccess == 'site_admin') {
$valueOverride = $this->getSetting('site_access_options', $siteAccess);
if (key_exists($attribute, $valueOverride)) {
// User has not changed default site access language. So just return current value.
if (erLhcoreClassModelUserSetting::getSetting('user_language', $valueOverride['locale']) == $valueOverride['locale']) {
return $valueOverride[$attribute];
} else {
// User has changed default siteaccess language, we need to check does ltr or rtl matches
foreach ($this->getSetting('site', 'available_site_access') as $siteaccess) {
// Loop untill we find our locate siteaccess and check it's language direction
$siteAccessOptions = $this->getSetting('site_access_options', $siteaccess);
if ($siteAccessOptions['locale'] == erLhcoreClassModelUserSetting::getSetting('user_language', $valueOverride['locale'])) {
return $siteAccessOptions[$attribute];
}
}
}
}
} else {
$value = $this->getOverrideValue('site', $attribute);
}
return $value;
}
示例2: getSpeechInstance
public static function getSpeechInstance(erLhcoreClassModelChat $chat)
{
$chatLanguageSession = null;
$chatSpeech = erLhcoreClassModelSpeechChatLanguage::getList(array('filter' => array('chat_id' => $chat->id)));
if (empty($chatSpeech)) {
$chatLanguageSession = new erLhcoreClassModelSpeechChatLanguage();
$chatLanguageSession->chat_id = $chat->id;
$speechUserLanguage = erLhcoreClassModelUserSetting::getSetting('speech_language', '');
$speechUserDialect = erLhcoreClassModelUserSetting::getSetting('speech_dialect', '');
if ($speechUserLanguage != '' && $speechUserDialect != '') {
$chatLanguageSession->dialect = $speechUserDialect;
$chatLanguageSession->language_id = $speechUserLanguage;
} else {
$speechData = erLhcoreClassModelChatConfig::fetch('speech_data');
$data = (array) $speechData->data;
$chatLanguageSession->language_id = $data['language'];
$chatLanguageSession->dialect = $data['dialect'];
}
} else {
$chatLanguageSession = array_pop($chatSpeech);
}
return $chatLanguageSession;
}
示例3:
<div class="columns large-<?php
$canUseChat == true ? print '9' : (print '12');
?>
">
<?php
echo $Result['content'];
?>
</div>
<?php
if ($canUseChat == true) {
$pendingTabEnabled = (int) erLhcoreClassModelUserSetting::getSetting('enable_pending_list', 1);
$activeTabEnabled = (int) erLhcoreClassModelUserSetting::getSetting('enable_active_list', 1);
$closedTabEnabled = (int) erLhcoreClassModelUserSetting::getSetting('enable_close_list', 0);
$unreadTabEnabled = (int) erLhcoreClassModelUserSetting::getSetting('enable_unread_list', 1);
?>
<div class="columns large-3" id="right-column-page" ng-cloak>
<div class="section-container auto" data-section="auto">
<section>
<p class="title" data-section-title><a title="<?php
echo erTranslationClassLhTranslation::getInstance()->getTranslation('pagelayout/pagelayout', 'Chats transferred to you directly');
?>
" href="#panel1"><i class="icon-user"></i><span class="tru-cnt"></span></a></p>
<div class="content" data-section-content>
<div id="right-transfer-chats">
<?php
include erLhcoreClassDesign::designtpl('lhchat/lists/angular_transfer_chats.tpl.php');
?>
</div>
</div>
示例4: session_write_close
$currentUser = erLhcoreClassUser::instance();
$onlineTimeout = (int) erLhcoreClassModelChatConfig::fetchCache('sync_sound_settings')->data['online_timeout'];
$canListOnlineUsers = false;
$canListOnlineUsersAll = false;
if (erLhcoreClassModelChatConfig::fetchCache('list_online_operators')->current_value == 1) {
$canListOnlineUsers = $currentUser->hasAccessTo('lhuser', 'userlistonline');
$canListOnlineUsersAll = $currentUser->hasAccessTo('lhuser', 'userlistonlineall');
}
// We do not need a session anymore
session_write_close();
$ReturnMessages = array();
$pendingTabEnabled = erLhcoreClassModelUserSetting::getSetting('enable_pending_list', 1);
$activeTabEnabled = erLhcoreClassModelUserSetting::getSetting('enable_active_list', 1);
$closedTabEnabled = erLhcoreClassModelUserSetting::getSetting('enable_close_list', 0);
$unreadTabEnabled = erLhcoreClassModelUserSetting::getSetting('enable_unread_list', 1);
$showAllPending = erLhcoreClassModelUserSetting::getSetting('show_all_pending', 1);
$showDepartmentsStats = $currentUser->hasAccessTo('lhuser', 'canseedepartmentstats');
if ($showDepartmentsStats == true) {
/**
* Departments stats
* */
$limitList = is_numeric($Params['user_parameters_unordered']['limitd']) ? (int) $Params['user_parameters_unordered']['limitd'] : 10;
$filter = array('ignore_fields' => erLhcoreClassChat::$chatListIgnoreField);
$filter['limit'] = $limitList;
if (is_array($Params['user_parameters_unordered']['departmentd']) && !empty($Params['user_parameters_unordered']['departmentd'])) {
erLhcoreClassChat::validateFilterIn($Params['user_parameters_unordered']['departmentd']);
$filter['filterin']['id'] = $Params['user_parameters_unordered']['departmentd'];
}
$filter['sort'] = 'pending_chats_counter DESC';
$departments = erLhcoreClassModelDepartament::getList($filter);
erLhcoreClassChat::prefillGetAttributes($departments, array('id', 'name', 'pending_chats_counter', 'active_chats_counter'), array(), array('remove_all' => true));
示例5: array
$soundData = array(0 => false, 'repeat_sound' => 1, 'repeat_sound_delay' => 5, 'show_alert' => false, 'new_chat_sound_enabled' => true, 'new_message_sound_admin_enabled' => true, 'new_message_sound_user_enabled' => true, 'online_timeout' => 300, 'check_for_operator_msg' => 10, 'back_office_sinterval' => 10, 'chat_message_sinterval' => 3.5, 'long_polling_enabled' => false, 'polling_chat_message_sinterval' => 1.5, 'polling_back_office_sinterval' => 5, 'connection_timeout' => 30, 'browser_notification_message' => false);
?>
confLH.back_office_sinterval = <?php
echo (int) ($soundData['back_office_sinterval'] * 1000);
?>
;confLH.chat_message_sinterval = <?php
echo (int) ($soundData['chat_message_sinterval'] * 1000);
?>
;confLH.new_chat_sound_enabled = <?php
echo (int) erLhcoreClassModelUserSetting::getSetting('new_chat_sound', (int) $soundData['new_chat_sound_enabled']);
?>
;confLH.new_message_sound_admin_enabled = <?php
echo (int) erLhcoreClassModelUserSetting::getSetting('chat_message', (int) $soundData['new_message_sound_admin_enabled']);
?>
;confLH.new_message_sound_user_enabled = <?php
echo (int) erLhcoreClassModelUserSetting::getSetting('chat_message', (int) $soundData['new_message_sound_user_enabled']);
?>
;confLH.new_message_browser_notification = <?php
echo isset($soundData['browser_notification_message']) ? (int) $soundData['browser_notification_message'] : 0;
?>
;confLH.transLation = {'new_chat':'New chat request'};confLH.csrf_token = '<?php
echo erLhcoreClassUser::instance()->getCSFRToken();
?>
';confLH.repeat_sound = <?php
echo (int) $soundData['repeat_sound'];
?>
;confLH.repeat_sound_delay = <?php
echo (int) $soundData['repeat_sound_delay'];
?>
;confLH.show_alert = <?php
echo (int) $soundData['show_alert'];
开发者ID:niravpatel2008,项目名称:north-american-nemesis-new,代码行数:31,代码来源:500733b9b91c99814e3e4d967c2043b3.php
示例6: array
<?php
$departmentNames = array();
$departmentList = array();
$departments = erLhcoreClassModelDepartament::getList($departmentParams);
foreach ($departments as $department) {
$departmentNames[$department->id] = $department->name;
$departmentList[] = array('id' => $department->id, 'name' => $department->name);
}
$dashboardOrder = (string) erLhcoreClassModelUserSetting::getSetting('dwo', '');
if ($dashboardOrder == '') {
$dashboardOrder = erLhcoreClassModelChatConfig::fetch('dashboard_order')->current_value;
}
$dashboardOrder = explode('|', $dashboardOrder);
$columnsTotal = count($dashboardOrder);
$columnSize = 12 / $columnsTotal;
?>
<div class="row" id="dashboard-body" ng-init='lhc.userDepartments=<?php
echo json_encode($departmentList, JSON_HEX_APOS);
?>
;lhc.userDepartmentsNames=<?php
echo json_encode($departmentNames, JSON_HEX_APOS);
?>
;lhc.setUpListNames(["actived","closedd","unreadd","pendingd","operatord","departmentd"])'>
<a class="dashboard-configuration" onclick="return lhc.revealModal({'url':WWW_DIR_JAVASCRIPT +'chat/dashboardwidgets'})" title="<?php
echo erTranslationClassLhTranslation::getInstance()->getTranslation('chat/syncadmininterface', 'Configure dashboard');
?>
"><i class="material-icons mr-0"></i></a>
<?php
for ($i = 0; $i < $columnsTotal; $i++) {
$widgets = array_filter(explode(',', $dashboardOrder[$i]));
示例7: explode
$canListOnlineUsersAll = $currentUser->hasAccessTo('lhuser', 'userlistonlineall');
}
$pendingTabEnabled = erLhcoreClassModelUserSetting::getSetting('enable_pending_list', 1);
$activeTabEnabled = erLhcoreClassModelUserSetting::getSetting('enable_active_list', 1);
$closedTabEnabled = erLhcoreClassModelUserSetting::getSetting('enable_close_list', 0);
$unreadTabEnabled = erLhcoreClassModelUserSetting::getSetting('enable_unread_list', 1);
$frontTabsOrder = explode(',', 'dashboard,online_users,online_map');
$browserNotification = (int) erLhcoreClassModelUserSetting::getSetting('new_user_bn', (int) 0);
$soundUserNotification = (int) erLhcoreClassModelUserSetting::getSetting('new_user_sound', (int) 0);
$onlineDepartment = (int) erLhcoreClassModelUserSetting::getSetting('o_department', (int) 0);
$ouserTimeout = (int) erLhcoreClassModelUserSetting::getSetting('ouser_timeout', (int) 3600);
$oupdTimeout = (int) erLhcoreClassModelUserSetting::getSetting('oupdate_timeout', (int) 10);
$omaxRows = (int) erLhcoreClassModelUserSetting::getSetting('omax_rows', (int) 50);
$ogroupBy = (string) erLhcoreClassModelUserSetting::getSetting('ogroup_by', 'none');
$omapDepartment = (int) erLhcoreClassModelUserSetting::getSetting('omap_depid', 0);
$omapMarkerTimeout = (int) erLhcoreClassModelUserSetting::getSetting('omap_mtimeout', 30);
$onlineCheck = (int) '0';
if ($onlineCheck > 0) {
$onlineCheck = ",online_user:(ou.last_check_time_ago < " . ($onlineCheck + 3) . ")";
} else {
$onlineCheck = '';
}
?>
<div ng-controller="OnlineCtrl as online" ng-init='groupByField = <?php
echo json_encode($ogroupBy);
?>
;online.maxRows=<?php
echo (int) $omaxRows;
?>
;online.updateTimeout=<?php
echo (int) $oupdTimeout;
开发者ID:niravpatel2008,项目名称:north-american-nemesis-new,代码行数:31,代码来源:5d0370c4f43d45420ba48ede3ad4b44f.php
示例8:
?>
" id="pending">
<form action="<?php
echo erLhcoreClassDesign::baseurl('user/edit');
?>
/<?php
echo $user->id;
?>
#pending" method="post">
<?php
include erLhcoreClassDesign::designtpl('lhkernel/csfr_token.tpl.php');
?>
<label><input type="checkbox" name="showAllPendingEnabled" value="1" <?php
erLhcoreClassModelUserSetting::getSetting('show_all_pending', 1, $user->id) == 1 ? print 'checked="checked"' : '';
?>
/> <?php
echo erTranslationClassLhTranslation::getInstance()->getTranslation('user/account', 'User can see all pending chats, not only assigned to him');
?>
</label><br>
<input type="submit" class="btn btn-default" name="UpdatePending_account" value="<?php
echo erTranslationClassLhTranslation::getInstance()->getTranslation('user/account', 'Update');
?>
"/>
</form>
</div>
<?php
if (erLhcoreClassUser::instance()->hasAccessTo('lhpermission', 'see_permissions_users')) {
?>
示例9:
<?php
$soundData = erLhcoreClassModelChatConfig::fetch('sync_sound_settings')->data;
$soundMessageEnabled = erLhcoreClassModelUserSetting::getSetting('chat_message', (int) $soundData['new_message_sound_admin_enabled']);
$soundNewChatEnabled = erLhcoreClassModelUserSetting::getSetting('new_chat_sound', (int) $soundData['new_chat_sound_enabled']);
$canChangeOnlineStatus = false;
$currentUser = erLhcoreClassUser::instance();
if ($currentUser->hasAccessTo('lhuser', 'changeonlinestatus')) {
$canChangeOnlineStatus = true;
if (!isset($UserData)) {
$UserData = $currentUser->getUserData(true);
}
}
$canChangeVisibilityMode = false;
if ($currentUser->hasAccessTo('lhuser', 'changevisibility')) {
$canChangeVisibilityMode = true;
if (!isset($UserData)) {
$UserData = $currentUser->getUserData(true);
}
}
?>
<?php
if ($currentUser->hasAccessTo('lhchat', 'use')) {
?>
<?php
if (!isset($hideULSetting)) {
?>
<ul class="list-inline user-settings-list pull-right">
<?php
示例10: foreach
<form action="<?php
echo erLhcoreClassDesign::baseurl('system/languages');
?>
" method="post">
<?php
include erLhcoreClassDesign::designtpl('lhkernel/csfr_token.tpl.php');
?>
<div class="form-group">
<label><?php
echo erTranslationClassLhTranslation::getInstance()->getTranslation('system/languages', 'Language');
?>
</label>
<select name="language" class="form-control">
<?php
$userLanguage = erLhcoreClassModelUserSetting::getSetting('user_language', erLhcoreClassSystem::instance()->Language);
foreach (erLhcoreClassSiteaccessGenerator::getLanguages() as $language) {
?>
<option value="<?php
echo $language['locale'];
?>
" <?php
$userLanguage == $language['locale'] ? print 'selected="selected"' : '';
?>
><?php
echo $language['locale'];
?>
</option>
<?php
}
?>
示例11: array
active<?php
}
?>
" id="speech">
<form action="<?php
echo erLhcoreClassDesign::baseurl('user/account');
?>
" method="post">
<?php
include erLhcoreClassDesign::designtpl('lhkernel/csfr_token.tpl.php');
?>
<?php
$dataSpeech = array('language' => (int) erLhcoreClassModelUserSetting::getSetting('speech_language', ''), 'dialect' => (int) erLhcoreClassModelUserSetting::getSetting('speech_dialect', ''), 'optional' => true);
?>
<?php
include erLhcoreClassDesign::designtpl('lhspeech/speech_form_fields.tpl.php');
?>
<input type="submit" class="btn btn-default" name="UpdateSpeech_account" value="<?php
echo erTranslationClassLhTranslation::getInstance()->getTranslation('user/account', 'Update');
?>
" />
</form>
</div>
<?php
}
示例12: getInstance
public static function getInstance()
{
if (is_null(self::$instance)) {
$sysConfiguration = erLhcoreClassSystem::instance();
$urlCfgDefault = ezcUrlConfiguration::getInstance();
$urlCfgDefault->basedir = $sysConfiguration->WWWDir;
$urlCfgDefault->script = $sysConfiguration->IndexFile;
$urlCfgDefault->unorderedDelimiters = array('(', ')');
$urlCfgDefault->orderedParameters = array();
$urlCfgDefault->unorderedParameters = array();
$urlCfgDefault->addOrderedParameter('siteaccess');
$urlCfgDefault->addOrderedParameter('module');
$urlCfgDefault->addOrderedParameter('function');
$cfgSite = erConfigClassLhConfig::getInstance();
$urlInstance = new erLhcoreClassURL(($cfgSite->getSetting('site', 'force_virtual_host', false) === false ? 'index.php' : '') . $sysConfiguration->RequestURI, $urlCfgDefault);
$siteaccess = $urlInstance->getParam('siteaccess');
$availableSiteaccess = $cfgSite->getSetting('site', 'available_site_access');
$defaultSiteAccess = $cfgSite->getSetting('site', 'default_site_access');
if ($defaultSiteAccess != $siteaccess && in_array($siteaccess, $availableSiteaccess)) {
$optionsSiteAccess = $cfgSite->getSetting('site_access_options', $siteaccess);
$sysConfiguration->Language = $siteaccess == 'site_admin' ? erLhcoreClassModelUserSetting::getSetting('user_language', $optionsSiteAccess['locale'], false, true) : $optionsSiteAccess['locale'];
$sysConfiguration->ThemeSite = $optionsSiteAccess['theme'];
$sysConfiguration->ContentLanguage = $optionsSiteAccess['content_language'];
$sysConfiguration->WWWDirLang = '/' . $siteaccess;
$sysConfiguration->SiteAccess = $siteaccess;
if ($optionsSiteAccess['locale'] != 'en_EN') {
$urlInstance->setParam('module', $urlInstance->getParam('module'));
$urlInstance->setParam('function', $urlInstance->getParam('function'));
}
if (isset($_POST['switchLang']) && in_array($_POST['switchLang'], $availableSiteaccess)) {
$optionsSiteAccessOverride = $cfgSite->getSetting('site_access_options', $_POST['switchLang']);
$sysConfiguration->Language = $optionsSiteAccessOverride['locale'];
$sysConfiguration->SiteAccess = $_POST['switchLang'];
if ($defaultSiteAccess != $sysConfiguration->SiteAccess) {
$sysConfiguration->WWWDirLang = '/' . $sysConfiguration->SiteAccess;
} else {
$sysConfiguration->WWWDirLang = '';
}
}
} else {
$optionsSiteAccess = $cfgSite->getSetting('site_access_options', $defaultSiteAccess);
// Falling back
$sysConfiguration->SiteAccess = $defaultSiteAccess;
$sysConfiguration->Language = $siteaccess == 'site_admin' ? erLhcoreClassModelUserSetting::getSetting('user_language', $optionsSiteAccess['locale'], false, true) : $optionsSiteAccess['locale'];
$sysConfiguration->ThemeSite = $optionsSiteAccess['theme'];
$sysConfiguration->ContentLanguage = $optionsSiteAccess['content_language'];
if (isset($_POST['switchLang']) && in_array($_POST['switchLang'], $availableSiteaccess)) {
$optionsSiteAccessOverride = $cfgSite->getSetting('site_access_options', $_POST['switchLang']);
$sysConfiguration->Language = $optionsSiteAccessOverride['locale'];
$sysConfiguration->SiteAccess = $_POST['switchLang'];
if ($defaultSiteAccess != $sysConfiguration->SiteAccess) {
$sysConfiguration->WWWDirLang = '/' . $sysConfiguration->SiteAccess;
}
}
// To reset possition counter
$urlCfgDefault->removeOrderedParameter('siteaccess');
$urlCfgDefault->removeOrderedParameter('module');
$urlCfgDefault->removeOrderedParameter('function');
// Reinit parameters
$urlCfgDefault->addOrderedParameter('module');
$urlCfgDefault->addOrderedParameter('function');
//Apply default configuration
$urlInstance->applyConfiguration($urlCfgDefault);
if ($optionsSiteAccess['locale'] != 'en_EN') {
$urlInstance->setParam('module', $urlInstance->getParam('module'));
$urlInstance->setParam('function', $urlInstance->getParam('function'));
}
}
self::$instance = $urlInstance;
}
return self::$instance;
}