• Модуль: sale
  • Путь к файлу: ~/bitrix/modules/sale/lib/delivery/rest/handlerservice.php
  • Класс: BitrixSaleDeliveryRestHandlerService
  • Вызов: HandlerService::convertArrayForSaving
static function convertArrayForSaving(array $items, string $path = ''): array
{
	$result = [];

	foreach ($items as $item)
	{
		if (!isset($item['CODE']))
		{
			throw new RestException(
				($path === '' ? '' : $path . ' ') . 'Item CODE is not specified',
				self::ERROR_CHECK_FAILURE
			);
		}

		$profileCode = $item['CODE'];
		unset($item['CODE']);

		$result[$profileCode] = $item;
	}

	return $result;
}