Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
measure.php
1
<?php
2
namespace
Bitrix\Catalog
;
3
4
use
Bitrix\Main
,
5
Bitrix\Main\Localization\Loc
;
6
7
Loc::loadMessages
(__FILE__);
8
39
class
MeasureTable
extends
Main\Entity\DataManager
40
{
46
public
static
function
getTableName
()
47
{
48
return
'b_catalog_measure'
;
49
}
50
56
public
static
function
getMap
()
57
{
58
return
array(
59
'ID'
=>
new
Main\
Entity
\
IntegerField
(
'ID'
, array(
60
'primary'
=>
true
,
61
'autocomplete'
=>
true
,
62
'title'
=>
Loc::getMessage
(
'MEASURE_ENTITY_ID_FIELD'
)
63
)),
64
'CODE'
=>
new
Main\
Entity
\
IntegerField
(
'CODE'
, array(
65
'required'
=>
true
,
66
'title'
=>
Loc::getMessage
(
'MEASURE_ENTITY_CODE_FIELD'
)
67
)),
68
'MEASURE_TITLE'
=>
new
Main\
Entity
\
StringField
(
'MEASURE_TITLE'
, array(
69
'validation'
=> array(__CLASS__,
'validateMeasureTitle'
),
70
'title'
=>
Loc::getMessage
(
'MEASURE_ENTITY_MEASURE_TITLE_FIELD'
)
71
)),
72
'SYMBOL'
=>
new
Main\
Entity
\
StringField
(
'SYMBOL'
, array(
73
'column_name'
=>
'SYMBOL_RUS'
,
74
'validation'
=> array(__CLASS__,
'validateSymbol'
),
75
'title'
=>
Loc::getMessage
(
'MEASURE_ENTITY_SYMBOL_FIELD'
)
76
)),
77
'SYMBOL_INTL'
=>
new
Main\
Entity
\
StringField
(
'SYMBOL_INTL'
, array(
78
'validation'
=> array(__CLASS__,
'validateSymbolIntl'
),
79
'title'
=>
Loc::getMessage
(
'MEASURE_ENTITY_SYMBOL_INTL_FIELD'
)
80
)),
81
'SYMBOL_LETTER_INTL'
=>
new
Main\
Entity
\
StringField
(
'SYMBOL_LETTER_INTL'
, array(
82
'validation'
=> array(__CLASS__,
'validateSymbolLetterIntl'
),
83
'title'
=>
Loc::getMessage
(
'MEASURE_ENTITY_SYMBOL_LETTER_INTL_FIELD'
)
84
)),
85
'IS_DEFAULT'
=>
new
Main\
Entity
\
BooleanField
(
'IS_DEFAULT'
, array(
86
'values'
=> array(
'N'
,
'Y'
),
87
'default_value'
=>
'N'
,
88
'title'
=>
Loc::getMessage
(
'MEASURE_ENTITY_IS_DEFAULT_FIELD'
)
89
))
90
);
91
}
97
public
static
function
validateMeasureTitle
()
98
{
99
return
array(
100
new
Main\
Entity
\Validator\Length(
null
, 500),
101
);
102
}
108
public
static
function
validateSymbol
()
109
{
110
return
array(
111
new
Main\
Entity
\Validator\Length(
null
, 20),
112
);
113
}
119
public
static
function
validateSymbolIntl
()
120
{
121
return
array(
122
new
Main\
Entity
\Validator\Length(
null
, 20),
123
);
124
}
130
public
static
function
validateSymbolLetterIntl
()
131
{
132
return
array(
133
new
Main\
Entity
\Validator\Length(
null
, 20),
134
);
135
}
136
}
Bitrix\Catalog\MeasureTable
Definition
measure.php:40
Bitrix\Catalog\MeasureTable\validateMeasureTitle
static validateMeasureTitle()
Definition
measure.php:97
Bitrix\Catalog\MeasureTable\validateSymbolIntl
static validateSymbolIntl()
Definition
measure.php:119
Bitrix\Catalog\MeasureTable\getMap
static getMap()
Definition
measure.php:56
Bitrix\Catalog\MeasureTable\validateSymbolLetterIntl
static validateSymbolLetterIntl()
Definition
measure.php:130
Bitrix\Catalog\MeasureTable\validateSymbol
static validateSymbol()
Definition
measure.php:108
Bitrix\Catalog\MeasureTable\getTableName
static getTableName()
Definition
measure.php:46
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\BooleanField
Definition
booleanfield.php:20
Bitrix\Main\ORM\Fields\IntegerField
Definition
integerfield.php:20
Bitrix\Main\ORM\Fields\StringField
Definition
stringfield.php:20
Bitrix\Catalog
Bitrix\Main
modules
catalog
lib
measure.php
Создано системой
1.10.0