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


PHP VTCacheUtils::lookupFieldInfo方法代碼示例

本文整理匯總了PHP中VTCacheUtils::lookupFieldInfo方法的典型用法代碼示例。如果您正苦於以下問題:PHP VTCacheUtils::lookupFieldInfo方法的具體用法?PHP VTCacheUtils::lookupFieldInfo怎麽用?PHP VTCacheUtils::lookupFieldInfo使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在VTCacheUtils的用法示例。


在下文中一共展示了VTCacheUtils::lookupFieldInfo方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: vtlib_purify

    $focus->id = '';
    $focus->mode = '';
}
$focus->preEditCheck($_REQUEST, $smarty);
if (!empty($_REQUEST['save_error']) and $_REQUEST['save_error'] == "true") {
    if (!empty($_REQUEST['encode_val'])) {
        global $current_user;
        $encode_val = vtlib_purify($_REQUEST['encode_val']);
        $decode_val = base64_decode($encode_val);
        $explode_decode_val = explode('&', trim($decode_val, '&'));
        $tabid = getTabid($currentModule);
        foreach ($explode_decode_val as $fieldvalue) {
            $value = explode("=", $fieldvalue);
            $field_name_val = $value[0];
            $field_value = urldecode($value[1]);
            $finfo = VTCacheUtils::lookupFieldInfo($tabid, $field_name_val);
            if ($finfo !== false) {
                if ($finfo['uitype'] == '56') {
                    $field_value = $field_value == 'on' ? '1' : '0';
                }
                if ($finfo['uitype'] == '71' or $finfo['uitype'] == '72') {
                    $currencyField = new CurrencyField($field_value);
                    $field_value = CurrencyField::convertToDBFormat($field_value, $current_user);
                }
                if ($finfo['uitype'] == '33' or $finfo['uitype'] == '3313') {
                    if (is_array($field_value)) {
                        $field_value = implode(' |##| ', $field_value);
                    }
                }
            }
            $focus->column_fields[$field_name_val] = $field_value;
開發者ID:casati-dolibarr,項目名稱:corebos,代碼行數:31,代碼來源:EditView.php

示例2: getFieldid

/**
 * Function to get the fieldid
 *
 * @param Integer $tabid
 * @param Boolean $onlyactive
 */
function getFieldid($tabid, $fieldname, $onlyactive = true)
{
    global $adb;
    // Look up information at cache first
    $fieldinfo = VTCacheUtils::lookupFieldInfo($tabid, $fieldname);
    if ($fieldinfo === false) {
        $query = "SELECT fieldid, fieldlabel, columnname, tablename, uitype, typeofdata, presence \n\t\t\tFROM vtiger_field WHERE tabid=? AND fieldname=?";
        $result = $adb->pquery($query, array($tabid, $fieldname));
        if ($adb->num_rows($result)) {
            $resultrow = $adb->fetch_array($result);
            // Update information to cache for re-use
            VTCacheUtils::updateFieldInfo($tabid, $fieldname, $resultrow['fieldid'], $resultrow['fieldlabel'], $resultrow['columnname'], $resultrow['tablename'], $resultrow['uitype'], $resultrow['typeofdata'], $resultrow['presence']);
            $fieldinfo = VTCacheUtils::lookupFieldInfo($tabid, $fieldname);
        }
    }
    // Get the field id based on required criteria
    $fieldid = false;
    if ($fieldinfo) {
        $fieldid = $fieldinfo['fieldid'];
        if ($onlyactive && !in_array($fieldinfo['presence'], array('0', '2'))) {
            $fieldid = false;
        }
    }
    return $fieldid;
}
開發者ID:p6,項目名稱:VF,代碼行數:31,代碼來源:CommonUtils.php

示例3: getFieldid

/**
 * Function to get the fieldid
 *
 * @param Integer $tabid
 * @param Boolean $onlyactive
 */
function getFieldid($tabid, $fieldname, $onlyactive = true)
{
    global $adb;
    // Look up information at cache first
    $fieldinfo = VTCacheUtils::lookupFieldInfo($tabid, $fieldname);
    if ($fieldinfo === false) {
        getColumnFields(getTabModuleName($tabid));
        $fieldinfo = VTCacheUtils::lookupFieldInfo($tabid, $fieldname);
    }
    // Get the field id based on required criteria
    $fieldid = false;
    if ($fieldinfo) {
        $fieldid = $fieldinfo['fieldid'];
        if ($onlyactive && !in_array($fieldinfo['presence'], array('0', '2'))) {
            $fieldid = false;
        }
    }
    return $fieldid;
}
開發者ID:hbsman,項目名稱:vtigercrm-5.3.0-ja,代碼行數:25,代碼來源:CommonUtils.php

示例4: getFieldRelatedInfo

function getFieldRelatedInfo($tabId, $fieldName)
{
    $fieldInfo = VTCacheUtils::lookupFieldInfo($tabId, $fieldName);
    if ($fieldInfo === false) {
        getColumnFields(getTabModuleName($tabid));
        $fieldInfo = VTCacheUtils::lookupFieldInfo($tabId, $fieldName);
    }
    return $fieldInfo;
}
開發者ID:mslokhat,項目名稱:corebos,代碼行數:9,代碼來源:Save.php


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