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


PHP VTCacheUtils::getReportFieldByLabel方法代碼示例

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


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

示例1: getFieldByReportLabel

/**
 * Function to get the field information from module name and field label
 */
function getFieldByReportLabel($module, $label)
{
    $cacheLabel = VTCacheUtils::getReportFieldByLabel($module, $label);
    if ($cacheLabel) {
        return $cacheLabel;
    }
    // this is required so the internal cache is populated or reused.
    getColumnFields($module);
    //lookup all the accessible fields
    $cachedModuleFields = VTCacheUtils::lookupFieldInfo_Module($module);
    $label = decode_html($label);
    if ($module == 'Calendar') {
        $cachedEventsFields = VTCacheUtils::lookupFieldInfo_Module('Events');
        if ($cachedEventsFields) {
            if (empty($cachedModuleFields)) {
                $cachedModuleFields = $cachedEventsFields;
            } else {
                $cachedModuleFields = array_merge($cachedModuleFields, $cachedEventsFields);
            }
        }
        if ($label == 'Start_Date_and_Time') {
            $label = 'Start_Date_&_Time';
        }
    }
    if (empty($cachedModuleFields)) {
        return null;
    }
    foreach ($cachedModuleFields as $fieldInfo) {
        $fieldLabel = str_replace(' ', '_', $fieldInfo['fieldlabel']);
        $fieldLabel = decode_html($fieldLabel);
        //SalesPlatform.ru begin fix get field info by label
        if ($label == $fieldLabel || $label == getTranslatedString($fieldLabel, $module)) {
            //if($label == $fieldLabel) {
            //SalesPlatform.ru end
            VTCacheUtils::setReportFieldByLabel($module, $label, $fieldInfo);
            return $fieldInfo;
        }
    }
    return null;
}
開發者ID:gitter-badger,項目名稱:openshift-salesplatform,代碼行數:43,代碼來源:ReportUtils.php

示例2: getFieldByReportLabel

/**
 * Function to get the field information from module name and field label
 */
function getFieldByReportLabel($module, $label)
{
    $cacheLabel = VTCacheUtils::getReportFieldByLabel($module, $label);
    if ($cacheLabel) {
        return $cacheLabel;
    }
    // this is required so the internal cache is populated or reused.
    getColumnFields($module);
    //lookup all the accessible fields
    $cachedModuleFields = VTCacheUtils::lookupFieldInfo_Module($module);
    if (empty($cachedModuleFields)) {
        return null;
    }
    foreach ($cachedModuleFields as $fieldInfo) {
        $fieldLabel = str_replace(' ', '_', $fieldInfo['fieldlabel']);
        if ($label == $fieldLabel) {
            VTCacheUtils::setReportFieldByLabel($module, $label, $fieldInfo);
            return $fieldInfo;
        }
    }
    return null;
}
開發者ID:nouphet,項目名稱:vtigercrm-6.0.0-ja,代碼行數:25,代碼來源:ReportUtils.php


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