Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
byusergroup.php
1<?php
3
5
11{
12 protected static function getEntityTypeId()
13 {
14 return \Bitrix\Sale\Internals\UserGroupRestrictionTable::ENTITY_TYPE_SHIPMENT;
15 }
16
21 protected static function getOrder(Sale\Internals\Entity $entity)
22 {
23 if ($entity instanceof Sale\Shipment)
24 {
26 $collection = $entity->getCollection();
27
29 return $collection->getOrder();
30 }
31 elseif ($entity instanceof Sale\Order)
32 {
34 return $entity;
35 }
36
37 return null;
38 }
39}