Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
userprofilecontactcompany.php
1<?php
2
3
5
6
7use Bitrix\Crm\Order\Matcher\EntityMatchManager;
8use Bitrix\Crm\Order\Order;
11
13{
14 public function getOwnerTypeId()
15 {
17 }
18
19 public function add(array $params)
20 {
21 $result = new Result();
22
23 $r = parent::add($params);
24 if($r->isSuccess())
25 {
26 $userId = $this->getEntity()->getField('ID');
27 $property = $params["ORDER_PROP"];
28
29 $order = Order::create($userId);
30 $order->getPropertyCollection()->setValuesFromPost(['PROPERTIES'=>$property], []);
31
32 EntityMatchManager::getInstance()->match($order);
33 }
34 return $result;
35 }
36}
static create($siteId, $userId=null, $currency=null)