本文整理汇总了PHP中Configurations::usersNameFormat方法的典型用法代码示例。如果您正苦于以下问题:PHP Configurations::usersNameFormat方法的具体用法?PHP Configurations::usersNameFormat怎么用?PHP Configurations::usersNameFormat使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Configurations
的用法示例。
在下文中一共展示了Configurations::usersNameFormat方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: LookForChildren
/**
* departments_Ajax.php
*
* ProcessMaker Open Source Edition
* Copyright (C) 2004 - 2008 Colosa Inc.23
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*/
function LookForChildren($parent, $level, $aDepUsers)
{
G::LoadClass('configuration');
$conf = new Configurations();
$oDept = new Department();
$allDepartments = $oDept->getDepartments($parent);
$level++;
$rows = array();
foreach ($allDepartments as $department) {
unset($depto);
$depto['DEP_TITLE'] = str_replace(array("<", ">"), array("<", ">"), $department['DEP_TITLE']);
$depto['DEP_STATUS'] = $department['DEP_STATUS'];
if ($department['DEP_MANAGER_USERNAME'] != '') {
$depto['DEP_MANAGER_NAME'] = $conf->usersNameFormat($department['DEP_MANAGER_USERNAME'], $department['DEP_MANAGER_FIRSTNAME'], $department['DEP_MANAGER_LASTNAME']);
} else {
$depto['DEP_MANAGER_NAME'] = '';
}
$depto['DEP_TOTAL_USERS'] = isset($aDepUsers[$department['DEP_UID']]) ? $aDepUsers[$department['DEP_UID']] : 0;
$depto['DEP_UID'] = $department['DEP_UID'];
$depto['DEP_MANAGER'] = $department['DEP_MANAGER'];
$depto['DEP_PARENT'] = $department['DEP_PARENT'];
if ($department['HAS_CHILDREN'] > 0) {
$depto['children'] = LookForChildren($department['DEP_UID'], $level, $aDepUsers);
$depto['iconCls'] = 'ss_sprite ss_chart_organisation';
$depto['expanded'] = true;
} else {
$depto['leaf'] = true;
if ($level == 1) {
$depto['iconCls'] = 'ss_sprite ss_chart_organisation';
} else {
$depto['iconCls'] = 'ss_sprite ss_plugin';
}
}
$rows[] = $depto;
}
return $rows;
}
示例2: Users
break;
case 'PROCESSMAKER_OPERATOR':
$aFields['PREF_DEFAULT_MENUSELECTED'] = 'PM_CASES';
break;
}
$aFields['PREF_DEFAULT_LANG'] = SYS_LANG;
}
if ($aFields['USR_REPLACED_BY'] != '') {
$user = new Users();
$u = $user->load($aFields['USR_REPLACED_BY']);
if ($u['USR_STATUS'] == 'CLOSED') {
$replaced_by = '';
$aFields['USR_REPLACED_BY'] = '';
} else {
$c = new Configurations();
$replaced_by = $c->usersNameFormat($u['USR_USERNAME'], $u['USR_FIRSTNAME'], $u['USR_LASTNAME']);
}
} else {
$replaced_by = '';
}
$aFields['REPLACED_NAME'] = $replaced_by;
$menuSelected = '';
if ($aFields['PREF_DEFAULT_MENUSELECTED'] != '') {
foreach ($RBAC->aUserInfo['PROCESSMAKER']['PERMISSIONS'] as $permission) {
if ($aFields['PREF_DEFAULT_MENUSELECTED'] == $permission['PER_CODE']) {
switch ($permission['PER_CODE']) {
case 'PM_USERS':
case 'PM_SETUP':
$menuSelected = strtoupper(G::LoadTranslation('ID_SETUP'));
break;
case 'PM_CASES':