1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
proxy.php
См. документацию.
1<?php
2namespace Bitrix\Sale\Exchange\Integration\Service\Batchable;
3
4
5use Bitrix\Sale\Exchange\Integration;
6
7abstract class Proxy extends Base
8{
12 abstract static protected function getProxy();
13
14 static public function proxyList(array $filter)
15 {
16 $proxy = static::getProxy();
17 $r = $proxy->getList([], $filter);
18 if($r->isSuccess())
19 {
20 $result = $r->getData()['DATA']['result'];
21 }
22 else
23 {
24 $result['error'] = $r->getErrorMessages();
25 }
26 return $result;
27 }
28 static public function proxyAdds(array $list)
29 {
30 $proxy = static::getProxy();
31 $list = static::prepareFieldsAdds($list);
32 $r = $proxy->adds($list);
33 if($r->isSuccess())
34 {
35 /*
36 * [result] => Array()
37 [result_error] => Array
38 (
39 [3] => Array
40 (
41 [error] =>
42 [error_description] => Не введено значение обязательного поля "Имя" или "Фамилия"
43 )
44 )
45 * */
46 $result = $r->getData()['DATA']['result'];
47 }
48 else
49 {
50 $result['error'] = $r->getErrorMessages();
51 }
52 return $result;
53 }
54
55 static protected function prepareFieldsAdds($fields)
56 {
57 $result = [];
58 foreach ($fields as $index=>$item)
59 {
60 $result[$index] = ['fields'=>$item];
61 }
62 return $result;
63 }
64}
static proxyAdds(array $list)
Определения proxy.php:28
static proxyList(array $filter)
Определения proxy.php:14
</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
$filter
Определения iblock_catalog_list.php:54
$proxy
Определения proxy.php:11