当前位置: 首页>>代码示例>>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;未经允许,请勿转载。