1
0
Fork 0
mirror of synced 2025-04-20 01:21:01 +00:00

remove add method for BuyerProfileRepository (entities have all necessary methods anyway)

This commit is contained in:
Pavel 2020-08-01 11:58:33 +03:00
parent 9eff510da4
commit 247aa9c6cc

View file

@ -56,25 +56,6 @@ class BuyerProfileRepository extends AbstractRepository
return !empty($found);
}
/**
* @param \Intaro\RetailCrm\Model\Bitrix\BuyerProfile $buyerProfile
*
* @return \Intaro\RetailCrm\Model\Bitrix\BuyerProfile|null
*/
public static function add(BuyerProfile $buyerProfile): ?BuyerProfile
{
$profileData = Serializer::serializeArray($buyerProfile);
$buyerProfileInstance = new \CSaleOrderUserProps();
if ($buyerProfileInstance->Add($profileData)) {
$profileData = OrderUserProperties::getList([
"filter" => $buyerProfile
])->fetch();
}
return static::deserialize($profileData);
}
/**
* Returns array with buyer profile if one was found. Returns empty array otherwise.
*