Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
status_lang.php
1
<?php
8
namespace
Bitrix\Sale\Internals
;
9
10
use
Bitrix\Main
,
11
Bitrix\Main\Localization\Loc
;
12
13
Loc::loadMessages
(__FILE__);
14
31
class
StatusLangTable
extends
Main\Entity\DataManager
32
{
33
public
static
function
getFilePath
()
34
{
35
return
__FILE__;
36
}
37
38
public
static
function
getTableName
()
39
{
40
return
'b_sale_status_lang'
;
41
}
42
43
public
static
function
getMap
()
44
{
45
return
array(
46
47
new
Main\
Entity
\
StringField
(
'STATUS_ID'
, array(
48
'primary'
=>
true
,
49
'format'
=>
'/^[A-Za-z]{1,2}$/'
,
50
'title'
=>
Loc::getMessage
(
'B_SALE_STATUS_LANG_STATUS_ID'
),
51
)),
52
53
new
Main\
Entity
\
StringField
(
'LID'
, array(
54
'primary'
=>
true
,
55
'format'
=>
'/^[a-z]{2}$/'
,
56
'title'
=>
Loc::getMessage
(
'B_SALE_STATUS_LANG_LID'
),
57
)),
58
59
new
Main\
Entity
\
StringField
(
'NAME'
, array(
60
'required'
=>
true
,
61
'title'
=>
Loc::getMessage
(
'B_SALE_STATUS_LANG_NAME'
),
62
)),
63
64
new
Main\
Entity
\
StringField
(
'DESCRIPTION'
, array(
65
'title'
=>
Loc::getMessage
(
'B_SALE_STATUS_LANG_DESCRIPTION'
),
66
)),
67
68
new
Main\
Entity
\ReferenceField(
'STATUS'
,
'Bitrix\Sale\Internals\StatusTable'
,
69
array(
'=this.STATUS_ID'
=>
'ref.ID'
),
70
array(
'join_type'
=>
'INNER'
)
71
),
72
73
// field for filter operation on entity
74
//'ID' => array(
75
// 'data_type' => 'string',
76
// 'expression' => array(
77
// '%s', 'STATUS_ID'
78
// )
79
//),
80
81
);
82
}
83
84
public
static
function
deleteByStatus
($statusId)
85
{
86
$result = self::getList(array(
87
'select'
=> array(
'STATUS_ID'
,
'LID'
),
88
'filter'
=> array(
'=STATUS_ID'
=> $statusId)
89
));
90
91
while
($primary = $result->fetch())
92
{
93
self::delete($primary);
94
}
95
}
96
}
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\Main\ORM\Fields\StringField
Definition
stringfield.php:20
Bitrix\Sale\Internals\StatusLangTable
Definition
status_lang.php:32
Bitrix\Sale\Internals\StatusLangTable\getMap
static getMap()
Definition
status_lang.php:43
Bitrix\Sale\Internals\StatusLangTable\getFilePath
static getFilePath()
Definition
status_lang.php:33
Bitrix\Sale\Internals\StatusLangTable\deleteByStatus
static deleteByStatus($statusId)
Definition
status_lang.php:84
Bitrix\Sale\Internals\StatusLangTable\getTableName
static getTableName()
Definition
status_lang.php:38
Bitrix\Main
Bitrix\Sale\Internals
Definition
accountnumber.php:3
modules
sale
lib
internals
status_lang.php
Создано системой
1.10.0