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