BasePersonalize::buildAddress

  1. Bitrix24 API (v. 23.675.0)
  2. sender
  3. BasePersonalize
  4. buildAddress
  • Модуль: sender
  • Путь к файлу: ~/bitrix/modules/sender/lib/integration/crm/connectors/personalize/basepersonalize.php
  • Класс: Bitrix\Sender\Integration\Crm\Connectors\Personalize\BasePersonalize
  • Вызов: BasePersonalize::buildAddress
static function buildAddress($entityType,$address)
{
	$entityAddressClassName = '\\Bitrix\\Crm\\'.ucfirst(strtolower($entityType)).'Address';
	return Bitrix\Crm\Format\AddressFormatter::getSingleInstance()->formatTextComma(
		$entityAddressClassName::mapEntityFields(
			[
				'ADDRESS' => $address['ADDRESS'],
				'ADDRESS_2' => $address['ADDRESS_2'],
				'ADDRESS_CITY' => $address['ADDRESS_CITY'],
				'ADDRESS_REGION' => $address['ADDRESS_REGION'],
				'ADDRESS_PROVINCE' => $address['ADDRESS_PROVINCE'],
				'ADDRESS_POSTAL_CODE' => $address['ADDRESS_POSTAL_CODE'],
				'ADDRESS_COUNTRY' => $address['ADDRESS_COUNTRY'],
				'ADDRESS_LOC_ADDR_ID' => $address['ADDRESS_COUNTRY']
			]
		)
	);
}

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