• Модуль: sale
  • Путь к файлу: ~/bitrix/modules/sale/lib/exchange/integration/rest/remoteproxies/base.php
  • Класс: BitrixSaleExchangeIntegrationRestRemoteProxiesBase
  • Вызов: Base::batch
public function batch($pageType, $list)
{
	$batch = new CmdBatch();
	$batchItemCollection = new CmdBatchItemCollection();

	foreach ($list as $index=>$row)
	{
		$cmd = $this->cmd($pageType, $row);

		$batchItemCollection->addItem(
			CmdBatchItem::create($cmd)
				->setInternalIndex($index));
	}

	$this->setBatchItemCollection($batchItemCollection);

	return $batch
		//->setDirectory(CmdBatch::DIRECTORY_PAGE)
		->setPage(CmdBatch::CMD_PAGE)
		->setField('cmd', $batchItemCollection->toArray())
		->fill();
}