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


PHP G::getFormatUserList方法代码示例

本文整理汇总了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);
开发者ID:ralpheav,项目名称:processmaker,代码行数:31,代码来源:usersAjax.php

示例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;
 }
开发者ID:rodrigoivan,项目名称:processmaker,代码行数:13,代码来源:AppCacheView.php

示例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);
 }
开发者ID:emildev35,项目名称:processmaker,代码行数:26,代码来源:GTest.php

示例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);
开发者ID:nshong,项目名称:processmaker,代码行数:31,代码来源:proxyReassignUsersList.php

示例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 );

开发者ID:hpx2206,项目名称:processmaker-1,代码行数:29,代码来源:proxyReassignUsersList.php


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