Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
byproductcategory.php
1
<?php
2
namespace
Bitrix\Sale\Delivery\Restrictions
;
3
4
use
Bitrix\Main\Localization\Loc
;
5
use
Bitrix\Sale\Internals\Entity
;
6
use
Bitrix\Sale\Services\Base\ProductCategoryRestriction
;
7
use
Bitrix\Sale\Shipment
;
8
9
Loc::loadMessages
(__FILE__);
10
16
class
ByProductCategory
extends
ProductCategoryRestriction
17
{
18
public
static
$easeSort
= 400;
19
23
protected
static
function
getJsHandler
(): string
24
{
25
return
'BX.Sale.Delivery'
;
26
}
27
32
public
static
function
getClassDescription
() : string
33
{
34
return
Loc::getMessage
(
"SALE_DLVR_RSTR_BY_PC_DESCRIPT"
);
35
}
36
41
protected
static
function
getBasketItems
(
Entity
$entity): array
42
{
43
if
(!$entity instanceof
Shipment
)
44
{
45
return
[];
46
}
47
48
$basketItems = [];
49
51
foreach
($entity->getShipmentItemCollection()->getSellableItems() as $shipmentItem)
52
{
53
$basketItems[] = $shipmentItem->getBasketItem();
54
}
55
56
return
$basketItems;
57
}
58
}
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\Localization\Loc\getMessage
static getMessage($code, $replace=null, $language=null)
Definition
loc.php:29
Bitrix\Sale\Delivery\Restrictions\ByProductCategory
Definition
byproductcategory.php:17
Bitrix\Sale\Delivery\Restrictions\ByProductCategory\$easeSort
static $easeSort
Definition
byproductcategory.php:18
Bitrix\Sale\Delivery\Restrictions\ByProductCategory\getJsHandler
static getJsHandler()
Definition
byproductcategory.php:23
Bitrix\Sale\Delivery\Restrictions\ByProductCategory\getClassDescription
static getClassDescription()
Definition
byproductcategory.php:32
Bitrix\Sale\Services\Base\ProductCategoryRestriction
Definition
productcategoryrestriction.php:13
Bitrix\Sale\Services\Base\ProductCategoryRestriction\getBasketItems
static getBasketItems(Entity $entity)
Bitrix\Sale\Shipment
Definition
shipment.php:21
Bitrix\Sale\Delivery\Restrictions
Definition
base.php:2
modules
sale
lib
delivery
restrictions
byproductcategory.php
Создано системой
1.10.0