1C-Bitrix
25.700.0
Загрузка...
Поиск...
Не найдено
base.php
См. документацию.
1
<?php
2
namespace
Bitrix\Sale\Exchange\Integration\Rest\RemoteProxies
;
3
4
use
Bitrix\Sale\Exchange\Integration\Rest\Cmd
;
5
6
class
Base
7
implements
ICmd
8
{
9
protected
$batchItemCollection
;
10
11
public
function
cmd
($pageType,
$fields
)
12
{
13
$cmd =
Cmd\Factory::create
($pageType);
14
$cmd
15
->setFieldsValues(
$fields
)
16
->fill();
17
18
if
(!($cmd instanceof
Cmd
\
CmdBase
))
19
{
20
$cmd
21
->setPageByType($pageType);
22
}
23
24
return
$cmd;
25
}
26
public
function
batch
($pageType, $list)
27
{
28
$batch =
new
Cmd\Batch
();
29
$batchItemCollection
=
new
Cmd\Batch\ItemCollection
();
30
31
foreach
($list as $index=>$row)
32
{
33
$cmd = $this->
cmd
($pageType, $row);
34
35
$batchItemCollection
->addItem(
36
Cmd
\
Batch
\Item::create($cmd)
37
->setInternalIndex($index));
38
}
39
40
$this->
setBatchItemCollection
(
$batchItemCollection
);
41
42
return
$batch
43
//->setDirectory(Cmd\Batch::DIRECTORY_PAGE)
44
->setPage(
Cmd
\Batch::CMD_PAGE)
45
->setField(
'cmd'
,
$batchItemCollection
->toArray())
46
->fill();
47
}
48
49
protected
function
setBatchItemCollection
(
$batchItemCollection
)
50
{
51
$this->batchItemCollection =
$batchItemCollection
;
52
}
53
}
Bitrix\Sale\Exchange\Integration\CRM\Placement\Base
Определения
base.php:11
Bitrix\Sale\Exchange\Integration\Rest\Cmd\Batch\ItemCollection
Определения
itemcollection.php:8
Bitrix\Sale\Exchange\Integration\Rest\Cmd\CmdBase
Определения
cmdbase.php:8
Bitrix\Sale\Exchange\Integration\Rest\Cmd\Factory\create
static create($type)
Определения
factory.php:9
Bitrix\Sale\Exchange\Integration\Rest\RemoteProxies\Base\cmd
cmd($pageType, $fields)
Определения
base.php:11
Bitrix\Sale\Exchange\Integration\Rest\RemoteProxies\Base\$batchItemCollection
$batchItemCollection
Определения
base.php:9
Bitrix\Sale\Exchange\Integration\Rest\RemoteProxies\Base\setBatchItemCollection
setBatchItemCollection($batchItemCollection)
Определения
base.php:49
Bitrix\Sale\Exchange\Integration\Rest\RemoteProxies\Base\batch
batch($pageType, $list)
Определения
base.php:26
Bitrix\Sale\Exchange\Integration\Rest\RemoteProxies\ICmd
Определения
icmd.php:7
Bitrix\Sale\Exchange\Integration\Rest\Cmd\Batch
Определения
item.php:4
Bitrix\Sale\Exchange\Integration\Rest\Cmd
Определения
base.php:2
Bitrix\Sale\Exchange\Integration\Rest\RemoteProxies
Определения
base.php:2
$fields
$fields
Определения
yandex_run.php:501
bitrix
modules
sale
lib
exchange
integration
rest
remoteproxies
base.php
Создано системой
1.14.0