9 static public function create($type, $params=[])
11 if($type == BlockType::FINANCE_INFO)
15 elseif ($type == BlockType::PAYMENT)
19 elseif ($type == BlockType::BUYER)
23 elseif ($type == BlockType::ADDITIONAL)
27 elseif ($type == BlockType::STATUS)
31 elseif ($type == BlockType::INFO)
35 elseif ($type == BlockType::SHIPMENT_BASKET)
37 $shipment = $params[
'shipment'];
38 $jsObjName = isset($params[
'jsObjName'])?$params[
'jsObjName']:
'';
39 $idPrefix = isset($params[
'idPrefix'])?$params[
'idPrefix']:
'';
43 elseif ($type == BlockType::SHIPMENT_STATUS)
47 elseif ($type == BlockType::SHIPMENT || $type == BlockType::DELIVERY)
51 elseif ($type == BlockType::BASKET)
53 $order = $params[
'order'];
54 $jsObjName = isset($params[
'jsObjName']) ? $params[
'jsObjName']:
'';
55 $idPrefix = isset($params[
'idPrefix']) ? $params[
'idPrefix']:
'';
56 $createProductBasement = isset($params[
'createProductBasement']) ? $params[
'createProductBasement']:
true;
57 $mode = isset($params[
'mode']) ? $params[
'mode']: OrderBasket::EDIT_MODE;
59 $result =
new OrderBasket($order, $jsObjName, $idPrefix, $createProductBasement, $mode);
61 if (!empty($params[
'setSettingsShowPropsVisible']))
63 $result->setSettingsShowPropsVisible((
bool)$params[
'setSettingsShowPropsVisible']);
68 elseif ($type == BlockType::MARKER)
72 elseif ($type == BlockType::ANALYSIS)
76 elseif ($type == BlockType::DISCOUNT)
82 throw new \Bitrix\Main\NotSupportedException(
"Mode type: '".$type.
"' is not supported in current context");