Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
producttypemapper.php
1<?php
2
4
7
9{
10 public static function getType(int $catalogType): ?int
11 {
12 if ($catalogType === Catalog\ProductTable::TYPE_SET)
13 {
14 return Sale\BasketItem::TYPE_SET;
15 }
16
17 if ($catalogType === Catalog\ProductTable::TYPE_SERVICE)
18 {
19 return Sale\BasketItem::TYPE_SERVICE;
20 }
21
22 return null;
23 }
24
25 public static function getCatalogType(?int $saleType): ?int
26 {
27 if ($saleType === Sale\BasketItem::TYPE_SET)
28 {
29 return Catalog\ProductTable::TYPE_SET;
30 }
31
32 if ($saleType === Sale\BasketItem::TYPE_SERVICE)
33 {
34 return Catalog\ProductTable::TYPE_SERVICE;
35 }
36
37 return null;
38 }
39}