CCrmExternalSaleImport::ParseOrderDataOrderContractorsContacts

  1. Bitrix24 API (v. 23.675.0)
  2. crm
  3. CCrmExternalSaleImport
  4. ParseOrderDataOrderContractorsContacts
  • Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/classes/general/crm_external_sale_import.php
  • Класс: \CCrmExternalSaleImport
  • Вызов: CCrmExternalSaleImport::ParseOrderDataOrderContractorsContacts
private function ParseOrderDataOrderContractorsContacts($document)
{
	if (!is_array($document["Contact"]))
		return null;

	$arResult = array();
	foreach ($document["Contact"] as $arContact)
	{
		$arResultTmp = array();

		$arContact = $arContact["#"];
		foreach ($arContact as $key => $value)
		{
			$value = $value[0]["#"];
			switch ($key)
			{
				case 'Type':
					$arResultTmp["TYPE"] = $value;
					break;
				case 'Value':
					$arResultTmp["VALUE"] = $value;
					break;
				default:
					$arResultTmp[$key] = $value;
					break;
			}
		}

		$arResult[] = $arResultTmp;
	}

	return $arResult;
}

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