本文整理汇总了PHP中CCrmOwnerType::PrepareEntityInfoBatch方法的典型用法代码示例。如果您正苦于以下问题:PHP CCrmOwnerType::PrepareEntityInfoBatch方法的具体用法?PHP CCrmOwnerType::PrepareEntityInfoBatch怎么用?PHP CCrmOwnerType::PrepareEntityInfoBatch使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CCrmOwnerType
的用法示例。
在下文中一共展示了CCrmOwnerType::PrepareEntityInfoBatch方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
}
$arResult['HAS_PREV_PAGE'] = $pageNum > 1;
$arResult['ITEMS'] = $items;
$entityInfos = array();
/** @var Integrity\Duplicate $item **/
foreach ($items as $item) {
$entityID = $item->getRootEntityID();
if (!isset($entityInfos[$entityID])) {
$entityInfos[$entityID] = array();
}
}
$entityInfoOptions = array('ENABLE_EDIT_URL' => false, 'ENABLE_RESPONSIBLE' => true, 'ENABLE_RESPONSIBLE_PHOTO' => false);
if ($entityTypeID === CCrmOwnerType::Lead) {
$entityInfoOptions[$layoutID === CCrmOwnerType::Company ? 'TREAT_AS_COMPANY' : 'TREAT_AS_CONTACT'] = true;
}
\CCrmOwnerType::PrepareEntityInfoBatch($entityTypeID, $entityInfos, $enablePermissionCheck, $entityInfoOptions);
\CCrmFieldMulti::PrepareEntityInfoBatch('PHONE', $entityTypeName, $entityInfos, array('ENABLE_NORMALIZATION' => true));
\CCrmFieldMulti::PrepareEntityInfoBatch('EMAIL', $entityTypeName, $entityInfos);
$arResult['ENTITY_INFOS'] =& $entityInfos;
unset($entityInfos);
if ($arResult['HAS_PREV_PAGE']) {
$arResult['PREV_PAGE_URL'] = $APPLICATION->GetCurPageParam("pageNum=" . ($pageNum - 1), array("pageNum"));
}
if ($arResult['HAS_NEXT_PAGE']) {
$arResult['NEXT_PAGE_URL'] = $APPLICATION->GetCurPageParam("pageNum=" . ($pageNum + 1), array("pageNum"));
}
}
if ($isAdminUser) {
//~CRM_REBUILD_LEAD_DUP_INDEX, ~CRM_REBUILD_CONTACT_DUP_INDEX, ~CRM_REBUILD_COMPANY_DUP_INDEX
if (COption::GetOptionString('crm', "~CRM_REBUILD_{$entityTypeName}_DUP_INDEX", 'N') === 'Y') {
$arResult['NEED_FOR_REBUILD_DUP_INDEX'] = true;
示例2: array
/** @var \Bitrix\Crm\Integrity\DuplicateEntity $entity */
$entityTypeID = $entity->getEntityTypeID();
$entityID = $entity->getEntityID();
if (!isset($entityInfoByType[$entityTypeID])) {
$entityInfoByType[$entityTypeID] = array($entityID => array());
} elseif (count($entityInfoByType[$entityTypeID]) < 50 && !isset($entityInfoByType[$entityTypeID][$entityID])) {
$entityInfoByType[$entityTypeID][$entityID] = array();
}
}
}
unset($dup);
$totalEntities = 0;
$entityMultiFields = array();
foreach ($entityInfoByType as $entityTypeID => &$entityInfos) {
$totalEntities += count($entityInfos);
CCrmOwnerType::PrepareEntityInfoBatch($entityTypeID, $entityInfos, false, array('ENABLE_RESPONSIBLE' => true, 'ENABLE_EDIT_URL' => true, 'PHOTO_SIZE' => array('WIDTH' => 21, 'HEIGHT' => 21)));
$multiFieldResult = CCrmFieldMulti::GetListEx(array(), array('=ENTITY_ID' => CCrmOwnerType::ResolveName($entityTypeID), '@ELEMENT_ID' => array_keys($entityInfos), '@TYPE_ID' => array('PHONE', 'EMAIL')), false, false, array('ELEMENT_ID', 'TYPE_ID', 'VALUE'));
if (is_object($multiFieldResult)) {
$entityMultiFields[$entityTypeID] = array();
while ($multiFields = $multiFieldResult->Fetch()) {
$entityID = isset($multiFields['ELEMENT_ID']) ? intval($multiFields['ELEMENT_ID']) : 0;
if ($entityID <= 0) {
continue;
}
if (!isset($entityMultiFields[$entityTypeID][$entityID])) {
$entityMultiFields[$entityTypeID][$entityID] = array();
}
$typeID = isset($multiFields['TYPE_ID']) ? $multiFields['TYPE_ID'] : '';
$value = isset($multiFields['VALUE']) ? $multiFields['VALUE'] : '';
if ($typeID === '' || $value === '') {
continue;