1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
entityimportfactory.php
См. документацию.
1<?php
2namespace Bitrix\Sale\Exchange\Entity;
3
4use Bitrix\Main;
5use Bitrix\Sale\Exchange;
6
13{
21 public static function create($entityTypeID, $parentEntityContext = null)
22 {
23 if(!is_int($entityTypeID))
24 {
25 $entityTypeID = (int)$entityTypeID;
26 }
27
28 if(!Exchange\EntityType::IsDefined($entityTypeID))
29 {
31 }
32
33 if($entityTypeID === Exchange\EntityType::ORDER)
34 {
35 return new OrderImport(null);
36 }
37 elseif($entityTypeID === Exchange\EntityType::SHIPMENT)
38 {
39 return new ShipmentImport($parentEntityContext);
40 }
42 {
43 return new PaymentCashImport($parentEntityContext);
44 }
46 {
47 return new PaymentCashLessImport($parentEntityContext);
48 }
50 {
51 return new PaymentCardImport($parentEntityContext);
52 }
54 {
55 return new UserProfileImport();
56 }
58 {
59 return new UserProfileContactCompany();
60 }
61 elseif($entityTypeID === Exchange\EntityType::INVOICE)
62 {
63 return new Invoice(null);
64 }
66 {
67 return new ShipmentInvoice($parentEntityContext);
68 }
70 {
71 return new PaymentCashInvoice($parentEntityContext);
72 }
74 {
75 return new PaymentCashLessInvoice($parentEntityContext);
76 }
78 {
79 return new PaymentCardInvoice($parentEntityContext);
80 }
81 else
82 {
83 throw new Main\NotSupportedException("Entity type: '".Exchange\EntityType::ResolveName($entityTypeID)."' is not supported in current context");
84 }
85 }
86}
static create($entityTypeID, $parentEntityContext=null)
Определения entityimportfactory.php:21
const INVOICE_PAYMENT_CASH
Определения entitytype.php:18
const USER_PROFILE_CONTACT_COMPANY
Определения entitytype.php:15
const INVOICE_PAYMENT_CASH_LESS
Определения entitytype.php:19
const PAYMENT_CASH_LESS
Определения entitytype.php:11
const PAYMENT_CASH
Определения entitytype.php:10
const USER_PROFILE
Определения entitytype.php:14
const INVOICE_PAYMENT_CARD_TRANSACTION
Определения entitytype.php:20
const PAYMENT_CARD_TRANSACTION
Определения entitytype.php:12
const INVOICE_SHIPMENT
Определения entitytype.php:17
if( $daysToExpire >=0 &&$daysToExpire< 60 elseif)( $daysToExpire< 0)
Определения prolog_main_admin.php:393