Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
scenarios.php
1
<?php
2
3
4
namespace
Bitrix\Sale\Exchange\Integration\Controller
;
5
6
7
use
Bitrix\Main\Engine\Controller
;
8
use
Bitrix\Sale\Exchange\Integration
;
9
10
class
Scenarios
extends
Controller
11
{
12
public
function
activityAddsFromOrderListAction
(array $params)
13
{
14
$scenario =
new
Integration\Service\Scenarios\Controller\ActivityAdd
();
15
return
$this
16
->toArray(
17
$scenario->adds($params));
18
}
19
20
public
function
resolveContactFieldsValuesFromOrderListAction
(array $params)
21
{
22
return
[
'result'
=> (
new
Integration\Service\Scenarios\RefreshClient\Contact
())
23
->resolve($params)];
24
}
25
public
function
resolveUserTypeIAfterComparingRemotelyRelationFromOrderListAction
(array $params)
26
{
27
//$result == 0 if all dependents exists
28
29
$contacts = (
new
Integration\Service\Scenarios\RefreshClient\Contact
())
30
->diff($params)
31
->toArray();
32
33
return
[
'result'
=> $contacts];
34
}
35
public
function
contactAddsFromOrderListAction
(array $params)
36
{
37
$scenario =
new
Integration\Service\Scenarios\RefreshClient\Contact
();
38
return
$this
39
->toArray(
40
$scenario->adds($params)
41
);
42
}
43
44
public
function
dealContactItemsGetAction
($id)
45
{
46
return
[
'result'
=> (
new
Integration\Service\Scenarios\RefreshClientsDeal\Contact
())
47
->itemsGet($id)];
48
}
49
public
function
dealContactUpdatesAction
($id, array $items, array $contacts)
50
{
51
return
[
'result'
=> (
new
Integration\Service\Scenarios\RefreshClientsDeal\Contact
())
52
->updates($id, $items, $contacts)];
53
}
54
public
function
dealContactAddsAction
($id, array $items)
55
{
56
return
[
'result'
=> (
new
Integration\Service\Scenarios\RefreshClientsDeal\Contact
())
57
->adds($id, $items)];
58
}
59
60
protected
function
toArray(Integration\
Service
\Internal\Container\
Collection
$collection)
61
{
62
$result = [];
64
foreach
($collection as $item)
65
{
66
$result[$item->getInternalIndex()]= [
67
'result'
=>$item->getEntity()->getFieldsValues(),
68
'result_error'
=>$item->hasError() ? $item->getError()->getMessage():
''
,
69
];
70
}
71
return
$result;
72
}
73
}
Bitrix\Location\Entity\Location\Collection
Definition
collection.php:15
Bitrix\Main\Engine\Controller
Definition
controller.php:32
Bitrix\Sale\Exchange\Integration\Controller\Scenarios
Definition
scenarios.php:11
Bitrix\Sale\Exchange\Integration\Controller\Scenarios\dealContactItemsGetAction
dealContactItemsGetAction($id)
Definition
scenarios.php:44
Bitrix\Sale\Exchange\Integration\Controller\Scenarios\resolveUserTypeIAfterComparingRemotelyRelationFromOrderListAction
resolveUserTypeIAfterComparingRemotelyRelationFromOrderListAction(array $params)
Definition
scenarios.php:25
Bitrix\Sale\Exchange\Integration\Controller\Scenarios\dealContactAddsAction
dealContactAddsAction($id, array $items)
Definition
scenarios.php:54
Bitrix\Sale\Exchange\Integration\Controller\Scenarios\resolveContactFieldsValuesFromOrderListAction
resolveContactFieldsValuesFromOrderListAction(array $params)
Definition
scenarios.php:20
Bitrix\Sale\Exchange\Integration\Controller\Scenarios\dealContactUpdatesAction
dealContactUpdatesAction($id, array $items, array $contacts)
Definition
scenarios.php:49
Bitrix\Sale\Exchange\Integration\Controller\Scenarios\contactAddsFromOrderListAction
contactAddsFromOrderListAction(array $params)
Definition
scenarios.php:35
Bitrix\Sale\Exchange\Integration\Controller\Scenarios\activityAddsFromOrderListAction
activityAddsFromOrderListAction(array $params)
Definition
scenarios.php:12
Bitrix\Sale\Exchange\Integration\Service\Batchable\Contact
Definition
contact.php:7
Bitrix\Sale\Exchange\Integration\Service\Scenarios\ActivityAdd
Definition
activityadd.php:11
Bitrix\Sale\PaySystem\Service
Definition
service.php:31
Bitrix\Sale\Exchange\Integration\Controller
Definition
scenarios.php:4
Bitrix\Sale\Exchange\Integration
Bitrix\Sender\Internals\QueryController
Definition
action.php:8
modules
sale
lib
exchange
integration
controller
scenarios.php
Создано системой
1.10.0