Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
productcategory.php
1
<?php
2
3
namespace
Bitrix\Sale\Services\PaySystem\Restrictions
;
4
5
use
Bitrix\Main\Localization\Loc
;
6
use
Bitrix\Sale\Basket
;
7
use
Bitrix\Sale\BasketItem
;
8
use
Bitrix\Sale\Internals\Entity
;
9
use
Bitrix\Sale\Internals\EntityCollection
;
10
use
Bitrix\Sale\Order
;
11
use
Bitrix\Sale\Payment
;
12
use
Bitrix\Sale\PaymentCollection
;
13
use
Bitrix\Sale\Services\Base\ProductCategoryRestriction
;
14
use Twilio\TwiML\Voice\Pay;
15
16
Loc::loadMessages
(__FILE__);
17
18
class
ProductCategory
extends
ProductCategoryRestriction
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
49
if
(!$collection = $entity->getCollection())
50
{
51
return
[];
52
}
53
55
if
(!$order = $collection->getOrder())
56
{
57
return
[];
58
}
59
61
if
($orderBasket = $order->getBasket())
62
{
63
return
$orderBasket->getBasketItems();
64
}
65
66
return
[];
67
}
68
}
Bitrix\Catalog\Model\Entity
Definition
entity.php:12
Bitrix\Main\Localization\Loc
Definition
loc.php:11
Bitrix\Main\Localization\Loc\loadMessages
static loadMessages($file)
Definition
loc.php:64
Bitrix\Main\ORM\Entity
Definition
entity.php:26
Bitrix\Sale\BasketItem
Definition
basketitem.php:27
Bitrix\Sale\Helpers\Order
Definition
order.php:10
Bitrix\Sale\Internals\EntityCollection
Definition
entitycollection.php:13
Bitrix\Sale\PaymentCollection
Definition
paymentcollection.php:18
Bitrix\Sale\Payment
Definition
payment.php:19
Bitrix\Sale\Services\Base\ProductCategoryRestriction
Definition
productcategoryrestriction.php:13
Bitrix\Sale\Services\Base\ProductCategoryRestriction\getBasketItems
static getBasketItems(Entity $entity)
Bitrix\Sale\Services\PaySystem\Restrictions\ProductCategory
Definition
productcategory.php:19
Bitrix\Sale\Services\PaySystem\Restrictions\ProductCategory\getJsHandler
static getJsHandler()
Definition
productcategory.php:23
Bitrix\Sale\Services\PaySystem\Restrictions\ProductCategory\getClassDescription
static getClassDescription()
Definition
productcategory.php:32
Bitrix\Sale\Basket
Definition
baserefreshstrategy.php:3
Bitrix\Sale\Services\PaySystem\Restrictions
Definition
concreteproduct.php:3
modules
sale
lib
services
paysystem
restrictions
productcategory.php
Создано системой
1.10.0