Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
shipmentextraservice.php
1
<?php
2
namespace
Bitrix\Sale\Internals
;
3
4
use
Bitrix\Main
;
5
use
Bitrix\Main\Localization\Loc
;
6
Loc::loadMessages
(__FILE__);
7
35
class
ShipmentExtraServiceTable
extends
Main\Entity\DataManager
36
{
37
public
static
function
getFilePath
()
38
{
39
return
__FILE__;
40
}
41
42
public
static
function
getTableName
()
43
{
44
return
'b_sale_order_delivery_es'
;
45
}
46
47
public
static
function
getMap
()
48
{
49
return
array(
50
'ID'
=> array(
51
'data_type'
=>
'integer'
,
52
'primary'
=>
true
,
53
'autocomplete'
=>
true
,
54
'title'
=>
Loc::getMessage
(
'ORDER_DELIVERY_EXTRA_SERVICES_ENTITY_ID_FIELD'
),
55
),
56
'SHIPMENT_ID'
=> array(
57
'data_type'
=>
'integer'
,
58
'required'
=>
true
,
59
'title'
=>
Loc::getMessage
(
'ORDER_DELIVERY_EXTRA_SERVICES_ENTITY_SHIPMENT_ID_FIELD'
),
60
),
61
'EXTRA_SERVICE_ID'
=> array(
62
'data_type'
=>
'integer'
,
63
'required'
=>
true
,
64
'title'
=>
Loc::getMessage
(
'ORDER_DELIVERY_EXTRA_SERVICES_ENTITY_EXTRA_SERVICE_ID_FIELD'
),
65
),
66
'VALUE'
=> array(
67
'data_type'
=>
'string'
,
68
'validation'
=> array(__CLASS__,
'validateValue'
),
69
'title'
=>
Loc::getMessage
(
'ORDER_DELIVERY_EXTRA_SERVICES_ENTITY_VALUE_FIELD'
),
70
),
71
'EXTRA_SERVICE'
=> array(
72
'data_type'
=>
'\Bitrix\Sale\Delivery\ExtraServices\Table'
,
73
'reference'
=> array(
'=this.EXTRA_SERVICE_ID'
=>
'ref.ID'
),
74
),
75
);
76
}
77
public
static
function
validateValue
()
78
{
79
return
array(
80
new
Main\
Entity
\Validator\Length(
null
, 255),
81
);
82
}
83
84
public
static
function
deleteByShipmentId
($shipmentId)
85
{
86
if
(intval($shipmentId) > 0)
87
{
88
$con = \Bitrix\Main\Application::getConnection();
89
$sqlHelper = $con->getSqlHelper();
90
$strSql =
"DELETE FROM "
.self::getTableName().
" WHERE SHIPMENT_ID="
.$sqlHelper->forSql($shipmentId);
91
$con->queryExecute($strSql);
92
}
93
}
94
}
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\Internals\ShipmentExtraServiceTable
Definition
shipmentextraservice.php:36
Bitrix\Sale\Internals\ShipmentExtraServiceTable\getMap
static getMap()
Definition
shipmentextraservice.php:47
Bitrix\Sale\Internals\ShipmentExtraServiceTable\validateValue
static validateValue()
Definition
shipmentextraservice.php:77
Bitrix\Sale\Internals\ShipmentExtraServiceTable\getFilePath
static getFilePath()
Definition
shipmentextraservice.php:37
Bitrix\Sale\Internals\ShipmentExtraServiceTable\deleteByShipmentId
static deleteByShipmentId($shipmentId)
Definition
shipmentextraservice.php:84
Bitrix\Sale\Internals\ShipmentExtraServiceTable\getTableName
static getTableName()
Definition
shipmentextraservice.php:42
Bitrix\Main
Bitrix\Sale\Internals
Definition
accountnumber.php:3
modules
sale
lib
internals
shipmentextraservice.php
Создано системой
1.10.0