本文整理汇总了PHP中Configurations::userNameFormatGetFirstFieldByUsersTable方法的典型用法代码示例。如果您正苦于以下问题:PHP Configurations::userNameFormatGetFirstFieldByUsersTable方法的具体用法?PHP Configurations::userNameFormatGetFirstFieldByUsersTable怎么用?PHP Configurations::userNameFormatGetFirstFieldByUsersTable使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Configurations
的用法示例。
在下文中一共展示了Configurations::userNameFormatGetFirstFieldByUsersTable方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
$users[] = array("USR_UID" => "CURRENT_USER", "USR_FULLNAME" => G::LoadTranslation("ID_CURRENT_USER"));
//now get users, just for the Search action
switch ($action) {
case 'search_simple':
case 'search':
G::LoadClass("configuration");
$conf = new Configurations();
$confEnvSetting = $conf->getFormats();
$cUsers = new Criteria('workflow');
$cUsers->clearSelectColumns();
$cUsers->addSelectColumn(UsersPeer::USR_UID);
$cUsers->addSelectColumn(UsersPeer::USR_USERNAME);
$cUsers->addSelectColumn(UsersPeer::USR_FIRSTNAME);
$cUsers->addSelectColumn(UsersPeer::USR_LASTNAME);
$cUsers->add(UsersPeer::USR_STATUS, 'CLOSED', Criteria::NOT_EQUAL);
$cUsers->addAscendingOrderByColumn(UsersPeer::TABLE_NAME . "." . $conf->userNameFormatGetFirstFieldByUsersTable());
$oDataset = UsersPeer::doSelectRS($cUsers);
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
while ($oDataset->next()) {
$row = $oDataset->getRow();
$usrFullName = $conf->usersNameFormatBySetParameters($confEnvSetting["format"], $row["USR_USERNAME"], $row["USR_FIRSTNAME"], $row["USR_LASTNAME"]);
$users[] = array("USR_UID" => $row["USR_UID"], "USR_FULLNAME" => $usrFullName);
}
break;
default:
return $users;
break;
}
//return $users;
return print G::json_encode($users);
}
示例2: getAll
//.........这里部分代码省略.........
}
// first check if there is a PMTable defined within the list,
// the issue that brokes the normal criteria query seems to be fixed
if (isset( $oAppCache->confCasesList['PMTable'] ) && ! empty( $oAppCache->confCasesList['PMTable'] )) {
// then
$oAdditionalTables = AdditionalTablesPeer::retrieveByPK( $oAppCache->confCasesList['PMTable'] );
$tableName = $oAdditionalTables->getAddTabName();
$tableNameAux = $tableName;
$tableName = strtolower( $tableName );
$tableNameArray = explode( '_', $tableName );
foreach ($tableNameArray as $item) {
$newTableName[] = ucfirst( $item );
}
$tableName = implode( '', $newTableName );
// so the pm table class can be invoqued from the pm table model clases
if (! class_exists( $tableName )) {
require_once (PATH_DB . SYS_SYS . PATH_SEP . "classes" . PATH_SEP . $tableName . ".php");
}
}
$totalCount = AppCacheViewPeer::doCount($CriteriaCount, $distinct);
}
//Add sortable options
$sortBk = $sort;
if ($sortBk != "") {
$sort = "";
//Current delegation (*)
if (($action == "sent" || $action == "search" || $action == "simple_search" || $action == "to_revise" || $action == "to_reassign") && ($status != "TO_DO")) {
switch ($sortBk) {
case "APP_CACHE_VIEW.APP_CURRENT_USER":
$sort = "USRCR_" . $conf->userNameFormatGetFirstFieldByUsersTable();
break;
case "APP_CACHE_VIEW.APP_TAS_TITLE":
$sort = "APPDELCR_APP_TAS_TITLE";
break;
}
}
if (isset( $oAppCache->confCasesList['PMTable'] ) && ! empty( $oAppCache->confCasesList['PMTable'] ) && $tableNameAux != '') {
$sortTable = explode(".", $sortBk);
$additionalTableUid = $oAppCache->confCasesList["PMTable"];
require_once 'classes/model/Fields.php';
$oCriteria = new Criteria('workflow');
$oCriteria->addSelectColumn(FieldsPeer::FLD_UID);
$oCriteria->addSelectColumn(FieldsPeer::FLD_INDEX);
$oCriteria->addSelectColumn(FieldsPeer::FLD_NAME);
$oCriteria->addSelectColumn(FieldsPeer::FLD_DESCRIPTION);
$oCriteria->addSelectColumn(FieldsPeer::FLD_TYPE);
$oCriteria->addSelectColumn(FieldsPeer::FLD_SIZE);
$oCriteria->addSelectColumn(FieldsPeer::FLD_NULL);
$oCriteria->addSelectColumn(FieldsPeer::FLD_AUTO_INCREMENT);
$oCriteria->addSelectColumn(FieldsPeer::FLD_KEY);
$oCriteria->addSelectColumn(FieldsPeer::FLD_FOREIGN_KEY);
$oCriteria->addSelectColumn(FieldsPeer::FLD_FOREIGN_KEY_TABLE);
$oCriteria->addSelectColumn(FieldsPeer::FLD_DYN_NAME);
$oCriteria->addSelectColumn(FieldsPeer::FLD_DYN_UID);
$oCriteria->addSelectColumn(FieldsPeer::FLD_FILTER);
$oCriteria->add(FieldsPeer::ADD_TAB_UID, $additionalTableUid);
$oCriteria->add(FieldsPeer::FLD_NAME, $sortTable[1]);
$oCriteria->addAscendingOrderByColumn(FieldsPeer::FLD_INDEX);