Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
byconcreteproduct.php
1
<?php
2
3
namespace
Bitrix\Sale\Delivery\Restrictions
;
4
5
use
Bitrix\Main\Localization\Loc
;
6
use
Bitrix\Sale\Internals\Entity
;
7
use
Bitrix\Sale\Shipment
;
8
use
Bitrix\Sale\Services\Base\ConcreteProductRestriction
;
9
use
Bitrix\Sale\ShipmentItem
;
10
16
class
ByConcreteProduct
extends
ConcreteProductRestriction
17
{
21
protected
static
function
getJsHandler
(): string
22
{
23
return
"BX.Sale.Delivery"
;
24
}
25
30
public
static
function
getClassDescription
(): string
31
{
32
return
Loc::getMessage
(
'SALE_DLVR_RSTR_BY_CONCRETE_PRODUCT_DESC'
);
33
}
34
39
protected
static
function
getBasketItems
(
Entity
$entity): array
40
{
41
if
(!$entity instanceof
Shipment
)
42
{
43
return
[];
44
}
45
46
$basketItems = [];
47
49
foreach
($entity->getShipmentItemCollection()->getSellableItems() as $shipmentItem)
50
{
51
$basketItems[] = $shipmentItem->getBasketItem();
52
}
53
54
return
$basketItems;
55
}
56
}
Bitrix\Catalog\Model\Entity
Definition
entity.php:12
Bitrix\Main\Localization\Loc
Definition
loc.php:11
Bitrix\Main\Localization\Loc\getMessage
static getMessage($code, $replace=null, $language=null)
Definition
loc.php:29
Bitrix\Sale\Delivery\Restrictions\ByConcreteProduct
Definition
byconcreteproduct.php:17
Bitrix\Sale\Delivery\Restrictions\ByConcreteProduct\getJsHandler
static getJsHandler()
Definition
byconcreteproduct.php:21
Bitrix\Sale\Delivery\Restrictions\ByConcreteProduct\getClassDescription
static getClassDescription()
Definition
byconcreteproduct.php:30
Bitrix\Sale\Services\Base\ConcreteProductRestriction
Definition
concreteproductrestriction.php:18
Bitrix\Sale\Services\Base\ConcreteProductRestriction\getBasketItems
static getBasketItems(Entity $entity)
Bitrix\Sale\Shipment
Definition
shipment.php:21
Bitrix\Sale\ShipmentItem
Definition
shipmentitem.php:16
Bitrix\Sale\Delivery\Restrictions
Definition
base.php:2
modules
sale
lib
delivery
restrictions
byconcreteproduct.php
Создано системой
1.10.0