本文整理汇总了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;
}
示例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;
}