本文整理匯總了PHP中CCrmFieldMulti::GetEntityTypeInfos方法的典型用法代碼示例。如果您正苦於以下問題:PHP CCrmFieldMulti::GetEntityTypeInfos方法的具體用法?PHP CCrmFieldMulti::GetEntityTypeInfos怎麽用?PHP CCrmFieldMulti::GetEntityTypeInfos使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類CCrmFieldMulti
的用法示例。
在下文中一共展示了CCrmFieldMulti::GetEntityTypeInfos方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: getMultiFieldTypeIDs
protected static function getMultiFieldTypeIDs()
{
if (self::$MULTIFIELD_TYPE_IDS === null) {
self::$MULTIFIELD_TYPE_IDS = array_keys(CCrmFieldMulti::GetEntityTypeInfos());
}
return self::$MULTIFIELD_TYPE_IDS;
}
示例2: __CrmQuickPanelViewPrepareMultiFields
function __CrmQuickPanelViewPrepareMultiFields(array $multiFields, $entityTypeName, $entityID, $typeID)
{
if (empty($multiFields)) {
return null;
}
$arEntityTypeInfos = CCrmFieldMulti::GetEntityTypeInfos();
$arEntityTypes = CCrmFieldMulti::GetEntityTypes();
$sipConfig = array('STUB' => GetMessage('CRM_ENTITY_QPV_MULTI_FIELD_NOT_ASSIGNED'), 'ENABLE_SIP' => true, 'SIP_PARAMS' => array('ENTITY_TYPE' => 'CRM_' . $entityTypeName, 'ENTITY_ID' => $entityID));
$typeInfo = isset($arEntityTypeInfos[$typeID]) ? $arEntityTypeInfos[$typeID] : array();
$result = array('type' => 'multiField', 'caption' => isset($typeInfo['NAME']) ? $typeInfo['NAME'] : $typeID, 'data' => array('type' => $typeID, 'items' => array()));
foreach ($multiFields as $multiField) {
$value = isset($multiField['VALUE']) ? $multiField['VALUE'] : '';
$valueType = isset($multiField['VALUE_TYPE']) ? $multiField['VALUE_TYPE'] : '';
$entityType = $arEntityTypes[$typeID];
$valueTypeInfo = isset($entityType[$valueType]) ? $entityType[$valueType] : null;
$params = array('VALUE' => $value, 'VALUE_TYPE_ID' => $valueType, 'VALUE_TYPE' => $valueTypeInfo);
$result['data']['items'][] = CCrmViewHelper::PrepareMultiFieldValueItemData($typeID, $params, $sipConfig);
}
return $result;
}
示例3: RenderListMultiFields
public static function RenderListMultiFields(&$arFields, $prefix = '', $arOptions = null)
{
$result = array();
$arEntityTypes = CCrmFieldMulti::GetEntityTypes();
$arInfos = CCrmFieldMulti::GetEntityTypeInfos();
foreach ($arInfos as $typeID => &$arInfo) {
$result[$typeID] = self::RenderListMultiField($arFields, $typeID, $prefix, $arEntityTypes, $arOptions);
}
unset($arInfo);
return $result;
}