當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。