Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
paymentextraservice.php
1
<?php
2
namespace
Bitrix\Sale\Internals
;
3
4
use
Bitrix\Main
;
5
use
Bitrix\Main\Localization\Loc
;
6
7
Loc::loadMessages
(__FILE__);
8
9
class
PaymentExtraServiceTable
extends
Main\Entity\DataManager
10
{
11
public
static
function
getFilePath
()
12
{
13
return
__FILE__;
14
}
15
16
public
static
function
getTableName
()
17
{
18
return
'b_sale_order_payment_es'
;
19
}
20
21
public
static
function
getMap
()
22
{
23
return
array(
24
'ID'
=> array(
25
'data_type'
=>
'integer'
,
26
'primary'
=>
true
,
27
'autocomplete'
=>
true
,
28
'title'
=>
Loc::getMessage
(
'ORDER_PAYMENT_EXTRA_SERVICES_ENTITY_ID_FIELD'
),
29
),
30
'PAYMENT_ID'
=> array(
31
'data_type'
=>
'integer'
,
32
'required'
=>
true
,
33
'title'
=>
Loc::getMessage
(
'ORDER_PAYMENT_EXTRA_SERVICES_ENTITY_PAYMENT_ID_FIELD'
),
34
),
35
'EXTRA_SERVICE_ID'
=> array(
36
'data_type'
=>
'integer'
,
37
'required'
=>
true
,
38
'title'
=>
Loc::getMessage
(
'ORDER_PAYMENT_EXTRA_SERVICES_ENTITY_EXTRA_SERVICE_ID_FIELD'
),
39
),
40
'VALUE'
=> array(
41
'data_type'
=>
'string'
,
42
'validation'
=> array(__CLASS__,
'validateValue'
),
43
'title'
=>
Loc::getMessage
(
'ORDER_PAYMENT_EXTRA_SERVICES_ENTITY_VALUE_FIELD'
),
44
),
45
);
46
}
47
public
static
function
validateValue
()
48
{
49
return
array(
50
new
Main\
Entity
\Validator\Length(
null
, 255),
51
);
52
}
53
54
public
static
function
deleteByPaymentId
($paymentId)
55
{
56
if
((
int
)$paymentId > 0)
57
{
58
$con = Main\Application::getConnection();
59
$sqlHelper = $con->getSqlHelper();
60
$strSql =
"DELETE FROM "
.self::getTableName().
" WHERE PAYMENT_ID="
.(int)($paymentId);
61
$con->queryExecute($strSql);
62
}
63
}
64
}
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\PaymentExtraServiceTable
Definition
paymentextraservice.php:10
Bitrix\Sale\Internals\PaymentExtraServiceTable\getMap
static getMap()
Definition
paymentextraservice.php:21
Bitrix\Sale\Internals\PaymentExtraServiceTable\validateValue
static validateValue()
Definition
paymentextraservice.php:47
Bitrix\Sale\Internals\PaymentExtraServiceTable\getFilePath
static getFilePath()
Definition
paymentextraservice.php:11
Bitrix\Sale\Internals\PaymentExtraServiceTable\deleteByPaymentId
static deleteByPaymentId($paymentId)
Definition
paymentextraservice.php:54
Bitrix\Sale\Internals\PaymentExtraServiceTable\getTableName
static getTableName()
Definition
paymentextraservice.php:16
Bitrix\Main
Bitrix\Sale\Internals
Definition
accountnumber.php:3
modules
sale
lib
internals
paymentextraservice.php
Создано системой
1.10.0