Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
measure.php
1<?php
2namespace Bitrix\Catalog;
3
6
7Loc::loadMessages(__FILE__);
8
39class 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}
static loadMessages($file)
Definition loc.php:64
static getMessage($code, $replace=null, $language=null)
Definition loc.php:29