403Webshell
Server IP : 80.87.202.40  /  Your IP : 216.73.216.169
Web Server : Apache
System : Linux rospirotorg.ru 5.14.0-539.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Dec 5 22:26:13 UTC 2024 x86_64
User : bitrix ( 600)
PHP Version : 8.2.27
Disable Function : NONE
MySQL : OFF |  cURL : ON |  WGET : ON |  Perl : ON |  Python : OFF |  Sudo : ON |  Pkexec : ON
Directory :  /home/bitrix/ext_www/cvetdv.ru/bitrix/modules/sale/lib/helpers/admin/blocks/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /home/bitrix/ext_www/cvetdv.ru/bitrix/modules/sale/lib/helpers/admin/blocks/factory.php
<?php


namespace Bitrix\Sale\Helpers\Admin\Blocks;


class Factory
{
	static public function create($type, $params=[])
	{
		if($type == BlockType::FINANCE_INFO)
		{
			return new OrderFinanceInfo();
		}
		elseif ($type == BlockType::PAYMENT)
		{
			return new OrderPayment();
		}
		elseif ($type == BlockType::BUYER)
		{
			return new OrderBuyer();
		}
		elseif ($type == BlockType::ADDITIONAL)
		{
			return new OrderAdditional();
		}
		elseif ($type == BlockType::STATUS)
		{
			return new OrderStatus();
		}
		elseif ($type == BlockType::INFO)
		{
			return new OrderInfo();
		}
		elseif ($type == BlockType::SHIPMENT_BASKET)
		{
			$shipment = $params['shipment'];
			$jsObjName = isset($params['jsObjName'])?$params['jsObjName']:'';
			$idPrefix = isset($params['idPrefix'])?$params['idPrefix']:'';

			return new OrderBasketShipment($shipment, $jsObjName, $idPrefix);
		}
		elseif ($type == BlockType::SHIPMENT_STATUS)
		{
			return new OrderShipmentStatus();
		}
		elseif ($type == BlockType::SHIPMENT || $type == BlockType::DELIVERY)
		{
			return new OrderShipment();
		}
		elseif ($type == BlockType::BASKET)
		{
			$order = $params['order'];
			$jsObjName = isset($params['jsObjName']) ? $params['jsObjName']:'';
			$idPrefix = isset($params['idPrefix']) ? $params['idPrefix']:'';
			$createProductBasement = isset($params['createProductBasement']) ? $params['createProductBasement']: true;
			$mode = isset($params['mode']) ? $params['mode']: OrderBasket::EDIT_MODE;

			$result = new OrderBasket($order, $jsObjName, $idPrefix, $createProductBasement, $mode);

			if (!empty($params['setSettingsShowPropsVisible']))
			{
				$result->setSettingsShowPropsVisible((bool)$params['setSettingsShowPropsVisible']);
			}

			return $result;
		}
		elseif ($type == BlockType::MARKER)
		{
			return new OrderMarker();
		}
		elseif ($type == BlockType::ANALYSIS)
		{
			return new OrderAnalysis();
		}
		elseif ($type == BlockType::DISCOUNT)
		{
			return new OrderDiscount();
		}
		else
		{
			throw new \Bitrix\Main\NotSupportedException("Mode type: '".$type."' is not supported in current context");
		}
	}
}

Youez - 2016 - github.com/yon3zu
LinuXploit