Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
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
Definition
base.php:11
Bitrix\Sale\Exchange\Integration\CRM\Placement\Base\$fields
$fields
Definition
base.php:12
Bitrix\Sale\Exchange\Integration\Rest\Cmd\Batch\ItemCollection
Definition
itemcollection.php:8
Bitrix\Sale\Exchange\Integration\Rest\Cmd\Batch
Definition
batch.php:8
Bitrix\Sale\Exchange\Integration\Rest\Cmd\CmdBase
Definition
cmdbase.php:8
Bitrix\Sale\Exchange\Integration\Rest\RemoteProxies\Base\cmd
cmd($pageType, $fields)
Definition
base.php:11
Bitrix\Sale\Exchange\Integration\Rest\RemoteProxies\Base\$batchItemCollection
$batchItemCollection
Definition
base.php:9
Bitrix\Sale\Exchange\Integration\Rest\RemoteProxies\Base\setBatchItemCollection
setBatchItemCollection($batchItemCollection)
Definition
base.php:49
Bitrix\Sale\Exchange\Integration\Rest\RemoteProxies\Base\batch
batch($pageType, $list)
Definition
base.php:26
Bitrix\Sale\Exchange\Integration\Rest\RemoteProxies\ICmd
Definition
icmd.php:7
Bitrix\Sale\Exchange\Integration\Rest\Cmd
Definition
base.php:2
Bitrix\Sale\Exchange\Integration\Rest\RemoteProxies
Definition
base.php:2
modules
sale
lib
exchange
integration
rest
remoteproxies
base.php
Создано системой
1.10.0