Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
contact.php
1
<?php
2
namespace
Bitrix\Sale\Exchange\Integration\Service\Scenarios\RefreshClientsDeal
;
3
4
5
use
Bitrix\Sale\Exchange\Integration\Service\Batchable
;
6
use \Bitrix\Sale\Exchange\Integration\Service\Scenarios;
7
8
class
Contact
9
{
10
public
function
refreshById
($id, array $params)
11
{
12
$contact =
new
Scenarios\RefreshClient\Contact
();
13
$userList = $contact->resolve($params);
14
if
(count($userList)>0)
15
{
16
$contact->refresh($params);
17
18
$contacts = $this->
itemsGet
($id);
19
20
if
(count($contacts)>0)
21
{
22
$this->
updates
($id, $userList, $contacts);
23
}
24
else
25
{
26
$this->
adds
($id, $userList);
27
}
28
}
29
}
30
31
public
function
itemsGet
($id)
32
{
33
return
Batchable\Deal::contactItemsGet($id);
34
}
35
36
public
function
updates
($id, array $userList, array $contacts)
37
{
38
return
Batchable\Deal::dealContactUpdates($id, $userList, $contacts);
39
}
40
41
public
function
adds
($id, array $userList)
42
{
43
return
Batchable\Deal::dealContactAdds($id, $userList);
44
}
45
}
Bitrix\Sale\Exchange\Integration\Service\Batchable\Contact
Definition
contact.php:7
Bitrix\Sale\Exchange\Integration\Service\Scenarios\RefreshClientsDeal\Contact\adds
adds($id, array $userList)
Definition
contact.php:41
Bitrix\Sale\Exchange\Integration\Service\Scenarios\RefreshClientsDeal\Contact\itemsGet
itemsGet($id)
Definition
contact.php:31
Bitrix\Sale\Exchange\Integration\Service\Scenarios\RefreshClientsDeal\Contact\updates
updates($id, array $userList, array $contacts)
Definition
contact.php:36
Bitrix\Sale\Exchange\Integration\Service\Scenarios\RefreshClientsDeal\Contact\refreshById
refreshById($id, array $params)
Definition
contact.php:10
Bitrix\Sale\Exchange\Integration\Service\Batchable
Definition
activity.php:2
Bitrix\Sale\Exchange\Integration\Service\Scenarios\RefreshClientsDeal
Definition
contact.php:2
modules
sale
lib
exchange
integration
service
scenarios
refreshclientsdeal
contact.php
Создано системой
1.10.0