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


PHP CCrmFieldMulti::Add方法代码示例

本文整理汇总了PHP中CCrmFieldMulti::Add方法的典型用法代码示例。如果您正苦于以下问题:PHP CCrmFieldMulti::Add方法的具体用法?PHP CCrmFieldMulti::Add怎么用?PHP CCrmFieldMulti::Add使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CCrmFieldMulti的用法示例。


在下文中一共展示了CCrmFieldMulti::Add方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: array

 $arFields = array('TYPE_ID' => $typeID, 'SUBJECT' => $subject, 'COMPLETED' => isset($data['completed']) ? intval($data['completed']) > 0 ? 'Y' : 'N' : 'N', 'PRIORITY' => $priority, 'DESCRIPTION' => $descr, 'DESCRIPTION_TYPE' => CCrmContentType::PlainText, 'LOCATION' => $location, 'DIRECTION' => $direction, 'NOTIFY_TYPE' => CCrmActivityNotifyType::None, 'SETTINGS' => array());
 $arBindings = array("{$ownerTypeName}_{$ownerID}" => array('OWNER_TYPE_ID' => $ownerTypeID, 'OWNER_ID' => $ownerID));
 $notify = isset($data['notify']) ? $data['notify'] : null;
 if (is_array($notify)) {
     $arFields['NOTIFY_TYPE'] = isset($notify['type']) ? intval($notify['type']) : CCrmActivityNotifyType::Min;
     $arFields['NOTIFY_VALUE'] = isset($notify['value']) ? intval($notify['value']) : 15;
 }
 // Communications
 $arComms = array();
 if ($commEntityID <= 0 && $commType === 'PHONE' && $ownerTypeName !== 'DEAL') {
     // Communication entity ID is 0 (processing of new communications)
     // Communication type must present it determines TYPE_ID (is only 'PHONE' in current context)
     // Deal does not have multi fields.
     $fieldMulti = new CCrmFieldMulti();
     $arFieldMulti = array('ENTITY_ID' => $ownerTypeName, 'ELEMENT_ID' => $ownerID, 'TYPE_ID' => 'PHONE', 'VALUE_TYPE' => 'WORK', 'VALUE' => $commValue);
     $fieldMultiID = $fieldMulti->Add($arFieldMulti);
     if ($fieldMultiID > 0) {
         $commEntityType = $ownerTypeName;
         $commEntityID = $ownerID;
     }
 }
 if ($commEntityType !== '') {
     $arComms[] = array('ID' => $commID, 'TYPE' => $commType, 'VALUE' => $commValue, 'ENTITY_ID' => $commEntityID, 'ENTITY_TYPE_ID' => CCrmOwnerType::ResolveID($commEntityType));
     $bindingKey = $commEntityID > 0 ? "{$commEntityType}_{$commEntityID}" : uniqid("{$commEntityType}_");
     if (!isset($arBindings[$bindingKey])) {
         $arBindings[$bindingKey] = array('OWNER_TYPE_ID' => CCrmOwnerType::ResolveID($commEntityType), 'OWNER_ID' => $commEntityID);
     }
 }
 $isNew = $ID <= 0;
 $arPreviousFields = $ID > 0 ? CCrmActivity::GetByID($ID) : array();
 $storageTypeID = isset($data['storageTypeID']) ? intval($data['storageTypeID']) : CCrmActivityStorageType::Undefined;
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:31,代码来源:ajax.php


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