Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
concreteproduct.php
1<?php
2
4
10
11Loc::loadMessages(__FILE__);
12
19{
23 protected static function getJsHandler(): string
24 {
25 return 'BX.Sale.PaySystem';
26 }
27
32 public static function getClassDescription() : string
33 {
34 return '';
35 }
36
41 protected static function getBasketItems(Entity $entity): array
42 {
43 if (!$entity instanceof Payment)
44 {
45 return [];
46 }
47
48 $basketItems = [];
49
50 $payableItemCollection = $entity->getPayableItemCollection();
51 if ($payableItemCollection->isEmpty())
52 {
54 if (!$collection = $entity->getCollection())
55 {
56 return [];
57 }
58
60 if (!$order = $collection->getOrder())
61 {
62 return [];
63 }
64
66 if ($basket = $order->getBasket())
67 {
68 return $basket->getBasketItems();
69 }
70 }
71 else
72 {
73 $basketItemCollection = $payableItemCollection->getBasketItems();
74
76 foreach ($basketItemCollection as $payableBasketItem)
77 {
78 $basketItems[] = $payableBasketItem->getEntityObject();
79 }
80 }
81
82 return $basketItems;
83 }
84}
static loadMessages($file)
Definition loc.php:64