當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Configurations::userNameFormatGetFirstFieldByUsersTable方法代碼示例

本文整理匯總了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);
}
開發者ID:bqevin,項目名稱:processmaker,代碼行數:31,代碼來源:casesList_Ajax.php

示例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);
開發者ID:rrsc,項目名稱:processmaker,代碼行數:67,代碼來源:class.applications.php


注:本文中的Configurations::userNameFormatGetFirstFieldByUsersTable方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。