• Модуль: sale
  • Путь к файлу: ~/bitrix/modules/sale/lib/exchange/exportonecpackage.php
  • Класс: BitrixSaleExchangeExportOneCPackage
  • Вызов: ExportOneCPackage::loadItemsByCollection
protected function loadItemsByCollection(CollectionBase $collection, Order $order)
{
	$list = array();

	if(count($collection)>0)
	{
		foreach ($collection as $entity)
		{
			if($entity instanceof Shipment)
			{
				if($entity->isSystem())
					continue;
			}

			$typeId = $this->resolveEntityTypeId($entity);

			/** @var EntityImport $entityExport */
			$entityExport = $this->entityFactoryCreate($typeId);
			ManagerExport::configure($entityExport);
			static::load($entityExport, array('ID'=>$entity->getId()), $order);

			$list[] = $entityExport;
		}
	}

	return $list;
}