• Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/entityaddress.php
  • Класс: Bitrix\Crm\EntityAddress
  • Вызов: EntityAddress::cloneLocationAddress
static function cloneLocationAddress(int $locationAddressId): Address
{
	if ($locationAddressId > 0)
	{
		$addr = Address::load($locationAddressId);
		if ($addr instanceof Address)
		{
			$addr->setId(0);
			$addr->setLinks(new AddressLinkCollection());
			return $addr;
		}
	}
	throw new Main\ArgumentException('Location address id '.$locationAddressId.' not found');
}