Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
site.php
1<?php
3
7use Bitrix\Sale\Services;
11
17{
22 protected static function getOrder(Internals\Entity $entity)
23 {
24 if (!($entity instanceof Payment) && !($entity instanceof Shipment) && !($entity instanceof Order))
25 {
26 return null;
27 }
28
29 if ($entity instanceof Order)
30 {
31 return $entity;
32 }
33 else
34 {
36 $collection = $entity->getCollection();
37
39 return $collection->getOrder();
40 }
41 }
42}