1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
recipientcontact.php
См. документацию.
1<?php
2
3namespace Sale\Handlers\Delivery\Rest\DataProviders;
4
5use Bitrix\Sale;
6
12final class RecipientContact
13{
18 public static function getData(Sale\Shipment $shipment): ?array
19 {
20 $recipientContact = Sale\Delivery\Services\RecipientDataProvider::getContact($shipment);
21 if (!$recipientContact instanceof Sale\Delivery\Services\Contact)
22 {
23 return null;
24 }
25
26 $result = [
27 'NAME' => $recipientContact->getName(),
28 ];
29
30 $phones = $recipientContact->getPhones();
31 if (!empty($phones))
32 {
33 $result['PHONES'] = [];
34 foreach ($phones as $phone)
35 {
36 $result['PHONES'][] = [
37 'TYPE' => $phone->getType(),
38 'VALUE' => $phone->getValue(),
39 ];
40 }
41 }
42
43 return $result;
44 }
45}
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения file_new.php:804
$result
Определения get_property_values.php:14