Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
scenarios.php
1<?php
2
3
5
6
9
10class Scenarios extends Controller
11{
12 public function activityAddsFromOrderListAction(array $params)
13 {
15 return $this
16 ->toArray(
17 $scenario->adds($params));
18 }
19
20 public function resolveContactFieldsValuesFromOrderListAction(array $params)
21 {
23 ->resolve($params)];
24 }
26 {
27 //$result == 0 if all dependents exists
28
30 ->diff($params)
31 ->toArray();
32
33 return ['result' => $contacts];
34 }
35 public function contactAddsFromOrderListAction(array $params)
36 {
38 return $this
39 ->toArray(
40 $scenario->adds($params)
41 );
42 }
43
44 public function dealContactItemsGetAction($id)
45 {
47 ->itemsGet($id)];
48 }
49 public function dealContactUpdatesAction($id, array $items, array $contacts)
50 {
52 ->updates($id, $items, $contacts)];
53 }
54 public function dealContactAddsAction($id, array $items)
55 {
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}
resolveUserTypeIAfterComparingRemotelyRelationFromOrderListAction(array $params)
Definition scenarios.php:25
dealContactUpdatesAction($id, array $items, array $contacts)
Definition scenarios.php:49