本文整理匯總了PHP中Vtiger_Functions::computeCRMRecordLabels方法的典型用法代碼示例。如果您正苦於以下問題:PHP Vtiger_Functions::computeCRMRecordLabels方法的具體用法?PHP Vtiger_Functions::computeCRMRecordLabels怎麽用?PHP Vtiger_Functions::computeCRMRecordLabels使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Vtiger_Functions
的用法示例。
在下文中一共展示了Vtiger_Functions::computeCRMRecordLabels方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: handleEvent
function handleEvent($eventName, $data)
{
$adb = PearDatabase::getInstance();
if ($eventName == 'vtiger.entity.aftersave') {
$module = $data->getModuleName();
if ($module != "Users") {
$labelInfo = Vtiger_Functions::computeCRMRecordLabels($module, $data->getId(), true);
if (count($labelInfo) > 0) {
$label = decode_html($labelInfo[$data->getId()]['name']);
$search = decode_html($labelInfo[$data->getId()]['search']);
$adb->pquery('UPDATE vtiger_crmentity SET label=?,searchlabel=? WHERE crmid=?', array($label, $search, $data->getId()));
}
}
}
}
示例2: getEntityName
function getEntityName($module, $ids_list, $compute = false)
{
if ($compute) {
return Vtiger_Functions::computeCRMRecordLabels($module, $ids_list);
} else {
return Vtiger_Functions::getCRMRecordLabels($module, $ids_list);
}
}
示例3: sanitizeInventoryValues
function sanitizeInventoryValues($inventoryRow, $inventoryFields)
{
$inventoryEntries = [];
foreach ($inventoryFields as $field) {
$value = $inventoryRow[$field->getColumnName()];
if (in_array($field->getName(), ['Name', 'Reference'])) {
$value = trim($value);
if (!empty($value)) {
$recordModule = Vtiger_Functions::getCRMRecordType($value);
$displayValueArray = Vtiger_Functions::computeCRMRecordLabels($recordModule, $value);
if (!empty($displayValueArray)) {
foreach ($displayValueArray as $k => $v) {
$displayValue = $v;
}
}
if (!empty($recordModule) && !empty($displayValue)) {
$value = $recordModule . '::::' . $displayValue;
} else {
$value = '';
}
} else {
$value = '';
}
} else {
$value = $field->getDisplayValue($value);
}
$inventoryEntries['inv_' . $field->getColumnName()] = $value;
}
return $inventoryEntries;
}