File manager - Edit - /home/web/vm-3fadc827.na4u.ru/www/bitrix/modules/sale/handlers/delivery/rest/dataproviders/recipientcontact.php
Back
<?php namespace Sale\Handlers\Delivery\Rest\DataProviders; use Bitrix\Sale; /** * Class RecipientContact * @package Sale\Handlers\Delivery\Rest\DataProviders * @internal */ final class RecipientContact { /** * @param Shipment $shipment * @return array|null */ public static function getData(Sale\Shipment $shipment): ?array { $recipientContact = Sale\Delivery\Services\RecipientDataProvider::getContact($shipment); if (!$recipientContact instanceof Sale\Delivery\Services\Contact) { return null; } $result = [ 'NAME' => $recipientContact->getName(), ]; $phones = $recipientContact->getPhones(); if (!empty($phones)) { $result['PHONES'] = []; foreach ($phones as $phone) { $result['PHONES'][] = [ 'TYPE' => $phone->getType(), 'VALUE' => $phone->getValue(), ]; } } return $result; } }
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | Generation time: 0.24 |
proxy
|
phpinfo
|
Settings