当前位置: 首页>>代码示例>>PHP>>正文


PHP VTCacheUtils::setReportFieldByLabel方法代码示例

本文整理汇总了PHP中VTCacheUtils::setReportFieldByLabel方法的典型用法代码示例。如果您正苦于以下问题:PHP VTCacheUtils::setReportFieldByLabel方法的具体用法?PHP VTCacheUtils::setReportFieldByLabel怎么用?PHP VTCacheUtils::setReportFieldByLabel使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在VTCacheUtils的用法示例。


在下文中一共展示了VTCacheUtils::setReportFieldByLabel方法的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::setReportFieldByLabel方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。