1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
crmsharing.php
См. документацию.
1<?php
2
3namespace Bitrix\Calendar\Sharing\Crm;
4
5use Bitrix\Calendar\Sharing\Link\CrmDealLink;
6use Bitrix\Calendar\Sharing\Link\Factory;
7use Bitrix\Main\Error;
8use Bitrix\Main\Result;
9
11{
12 protected int $userId;
13 protected int $entityId;
14
19 public function __construct(int $userId, int $entityId)
20 {
21 $this->userId = $userId;
22 $this->entityId = $entityId;
23 }
24
33 public function generateCrmDealJointLink(
34 array $memberIds,
35 ?int $contactId = null,
36 ?int $contactType = null,
37 ?string $channelId = null,
38 ?string $senderId = null,
39 ): Result
40 {
41 $result = new Result();
42
43 if (
44 (!is_null($contactId) && $contactId <= 0)
45 || (!is_null($contactType) && $contactType <= 0)
46 )
47 {
48 $result->addError(new Error('Invalid data was provided', 100070));
49 }
50
51 if ($result->isSuccess())
52 {
53 $crmDealLink = (new CrmDealLink())
54 ->setOwnerId($this->userId)
55 ->setEntityId($this->entityId)
56 ->setContactType($contactType)
57 ->setContactId($contactId)
58 ->setChannelId($channelId)
59 ->setSenderId($senderId)
60 ;
61 $crmDealJointLink = Factory::getInstance()->createCrmDealJointLink($crmDealLink, $memberIds);
62 $result->setData(['link' => $crmDealJointLink]);
63 }
64
65 return $result;
66 }
67}
if(empty( $fields)) foreach($fields as $field) $channelId
Определения push.php:23
generateCrmDealJointLink(array $memberIds, ?int $contactId=null, ?int $contactType=null, ?string $channelId=null, ?string $senderId=null,)
Определения crmsharing.php:33
__construct(int $userId, int $entityId)
Определения crmsharing.php:19
Определения error.php:15
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения file_new.php:804
$result
Определения get_property_values.php:14