CCrmExternalChannelImport::formatErrorsPackage

  1. Bitrix24 API (v. 23.675.0)
  2. crm
  3. CCrmExternalChannelImport
  4. formatErrorsPackage
  • Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/rest/externalchannelimport.php
  • Класс: Bitrix\Crm\Rest\CCrmExternalChannelImport
  • Вызов: CCrmExternalChannelImport::formatErrorsPackage
public function formatErrorsPackage($errors, $num)
{
	$result = '';
	if(is_string($errors))
		$result .= 'Batch row '.$num.':'.$errors;
	elseif(count($errors)>0)
	{
		foreach($errors as $error)
		{
			if($error instanceof Main\Error)
			{
				$result .= 'Batch row '.$num.':'.$error->getMessage();
			}
			else
			{
				$result .= 'Batch row '.$num.':'.$error;
			}
		}
	}
	return $result;
}

Добавить комментарий