• Модуль: sale
  • Путь к файлу: ~/bitrix/modules/sale/lib/cashbox/rest/handlerservice.php
  • Класс: BitrixSaleCashboxRestHandlerService
  • Вызов: HandlerService::mergeHandlerSettings
static function mergeHandlerSettings($cashboxId, array $newSettings): array
{
	$dbResult = $existingSettings = CashboxRestHandlerTable::getList([
		'select' => ['SETTINGS'],
		'filter' => ['=ID' => $cashboxId],
		'limit' => 1,
	])->fetch();

	if (!$dbResult)
	{
		return $newSettings;
	}

	$existingSettings = $dbResult['SETTINGS'];
	if (!$existingSettings)
	{
		return $newSettings;
	}

	return array_replace_recursive($existingSettings, $newSettings);
}