本文整理汇总了PHP中G::getFormatUserList方法的典型用法代码示例。如果您正苦于以下问题:PHP G::getFormatUserList方法的具体用法?PHP G::getFormatUserList怎么用?PHP G::getFormatUserList使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类G
的用法示例。
在下文中一共展示了G::getFormatUserList方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Configurations
if (isset($_POST['USR_UID'])) {
$oCriteria->add(UsersPeer::USR_UID, $_POST['USR_UID'], Criteria::NOT_EQUAL);
}
$oDataset = UsersPeer::doSelectRS($oCriteria);
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
G::loadClass('configuration');
$oConf = new Configurations();
$oConf->loadConfig($obj, 'ENVIRONMENT_SETTINGS', '');
$defaultOption = isset($oConf->aConfig['format']) ? $oConf->aConfig['format'] : '';
$aUserInfo = array();
if (isset($_POST['addNone']) && $_POST['addNone'] == '1') {
$aUserInfo[] = array('USR_UID' => '', 'USER_FULLNAME' => '- ' . G::LoadTranslation('ID_NONE') . ' -');
}
while ($oDataset->next()) {
$aRow1 = $oDataset->getRow();
$infoUser = G::getFormatUserList($defaultOption, $aRow1);
$aUserInfo[] = array('USR_UID' => $aRow1['USR_UID'], 'USER_FULLNAME' => $infoUser);
}
print G::json_encode($aUserInfo);
break;
case 'availableCalendars':
G::LoadClass('calendar');
$calendar = new Calendar();
$calendarObj = $calendar->getCalendarList(true, true);
$oData[] = array('CALENDAR_UID' => '', 'CALENDAR_NAME' => '- None -');
foreach ($calendarObj['array'] as $rowid => $row) {
if ($rowid > 0) {
$oData[] = array('CALENDAR_UID' => $row['CALENDAR_UID'], 'CALENDAR_NAME' => $row['CALENDAR_NAME']);
}
}
print G::json_encode($oData);
示例2: getFormatedUser
public function getFormatedUser($sFormat, $aCaseUser, $userIndex)
{
require_once 'classes/model/Users.php';
$oUser = new Users();
try {
$aCaseUserRecord = $oUser->load($aCaseUser[$userIndex]);
$sCaseUser = G::getFormatUserList($sFormat, $aCaseUserRecord);
// . ' (' . $aCaseUserRecord['USR_USERNAME'] . ')';]
} catch (Exception $e) {
$sCaseUser = '';
}
return $sCaseUser;
}
示例3: testGetFormatUserList
/**
* @covers G::getFormatUserList
* @todo Implement testGetFormatUserList().
*/
public function testGetFormatUserList()
{
$aUserInfo['USR_USERNAME'] = 'fontiveros';
$aUserInfo['USR_FIRSTNAME'] = 'Fernando';
$aUserInfo['USR_LASTNAME'] = 'Ontiveros';
$response = G::getFormatUserList('@firstName @lastName', $aUserInfo);
$this->assertEquals('Fernando Ontiveros', $response);
$response = G::getFormatUserList('@firstName @lastName (@userName)', $aUserInfo);
$this->assertEquals('Fernando Ontiveros (fontiveros)', $response);
$response = G::getFormatUserList('@userName', $aUserInfo);
$this->assertEquals('fontiveros', $response);
$response = G::getFormatUserList('@userName (@firstName @lastName)', $aUserInfo);
$this->assertEquals('fontiveros (Fernando Ontiveros)', $response);
$response = G::getFormatUserList('@lastName @firstName', $aUserInfo);
$this->assertEquals('Ontiveros Fernando', $response);
$response = G::getFormatUserList('@lastName, @firstName', $aUserInfo);
$this->assertEquals('Ontiveros, Fernando', $response);
$response = G::getFormatUserList('@lastName, @firstName (@userName)', $aUserInfo);
$this->assertEquals('Ontiveros, Fernando (fontiveros)', $response);
$response = G::getFormatUserList('test', $aUserInfo);
$this->assertEquals('fontiveros', $response);
}
示例4: Configurations
$aCaseGroups = $oTasks->getGroupsOfTask($aCase['TAS_UID'], 1);
$oConf = new Configurations();
$ConfEnv = $oConf->getFormats();
foreach ($aCaseGroups as $aCaseGroup) {
$aCaseUsers = $oGroups->getUsersOfGroup($aCaseGroup['GRP_UID']);
foreach ($aCaseUsers as $aCaseUser) {
if ($aCaseUser['USR_UID'] != $sReassignFromUser) {
$aCaseUserRecord = $oUser->load($aCaseUser['USR_UID']);
$sCaseUser = G::getFormatUserList($ConfEnv['format'], $aCaseUserRecord);
// $aUsersInvolved[] = array ( 'userUid' => $aCaseUser['USR_UID'] , 'userFullname' => $aCaseUserRecord['USR_FIRSTNAME'] . ' ' . $aCaseUserRecord['USR_LASTNAME']); // . ' (' . $aCaseUserRecord['USR_USERNAME'] . ')';
$aUsersInvolved[] = array('userUid' => $aCaseUser['USR_UID'], 'userFullname' => $sCaseUser);
// . ' (' . $aCaseUserRecord['USR_USERNAME'] . ')';
}
}
}
$aCaseUsers = $oTasks->getUsersOfTask($aCase['TAS_UID'], 1);
foreach ($aCaseUsers as $aCaseUser) {
if ($aCaseUser['USR_UID'] != $sReassignFromUser) {
$aCaseUserRecord = $oUser->load($aCaseUser['USR_UID']);
$sCaseUser = G::getFormatUserList($ConfEnv['format'], $aCaseUserRecord);
// $aUsersInvolved[] = array ( 'userUid' => $aCaseUser['USR_UID'] , 'userFullname' => $aCaseUserRecord['USR_FIRSTNAME'] . ' ' . $aCaseUserRecord['USR_LASTNAME']); // . ' (' . $aCaseUserRecord['USR_USERNAME'] . ')';
$aUsersInvolved[] = array('userUid' => $aCaseUser['USR_UID'], 'userFullname' => $sCaseUser);
// . ' (' . $aCaseUserRecord['USR_USERNAME'] . ')';
}
}
// $oTmp = new stdClass();
// $oTmp->items = $aUsersInvolved;
$result = array();
$aUsersInvolved = array_sort($aUsersInvolved, 'userFullname', SORT_ASC, $query);
$result['data'] = $aUsersInvolved;
print G::json_encode($result);
示例5: isset
//$processUid = isset($_POST['process']) ? $_POST['process'] : '';
$TaskUid = isset( $_POST['task'] ) ? $_POST['task'] : '';
$sReassignFromUser = isset( $_POST['currentUser'] ) ? $_POST['currentUser'] : '';
G::LoadClass( 'case' );
$oCases = new Cases();
$oConf = new Configurations();
$aUsersInvolved = Array();
$ConfEnv = $oConf->getFormats();
if ($TaskUid != '') {
G::LoadClass( 'tasks' );
$task = new Task();
$tasks = $task->load($TaskUid);
$rows = $oCases->getUsersToReassign($TaskUid, $_SESSION['USER_LOGGED'], $tasks['PRO_UID']);
foreach ($rows as $row) {
$sCaseUser = G::getFormatUserList( $ConfEnv['format'], $row );
$aUsersInvolved[] = array ('userUid' => $row['USR_UID'], 'userFullname' => $sCaseUser);
}
}
// $oTmp = new stdClass();
// $oTmp->items = $aUsersInvolved;
$result = array ();
$aUsersInvolved = array_sort( $aUsersInvolved, 'userFullname', SORT_ASC, $query );
$result['data'] = $aUsersInvolved;
print G::json_encode( $result );