当前位置: 首页>>代码示例>>PHP>>正文


PHP CCrmOwnerType::PrepareEntityInfoBatch方法代码示例

本文整理汇总了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;
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:31,代码来源:component.php

示例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;
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:31,代码来源:ajax.php


注:本文中的CCrmOwnerType::PrepareEntityInfoBatch方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。