Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
categoryvariation.php
1<?php
2
4
7Loc::loadMessages(__FILE__);
8
42class CategoryVariationTable extends Entity\DataManager
43{
44 public static function getFilePath()
45 {
46 return __FILE__;
47 }
48
49 public static function getTableName()
50 {
51 return 'b_sale_tp_ebay_cat_var';
52 }
53
54 public static function getMap()
55 {
56 return array(
57 'ID' => array(
58 'data_type' => 'integer',
59 'primary' => true,
60 'autocomplete' => true,
61 'title' => Loc::getMessage('TRADING_PLATFORM_EBAY_VARIATION_METADATA_ENTITY_ID_FIELD'),
62 ),
63 'CATEGORY_ID' => array(
64 'data_type' => 'integer',
65 'required' => true,
66 'title' => Loc::getMessage('TRADING_PLATFORM_EBAY_VARIATION_METADATA_ENTITY_CATEGORY_ID_FIELD'),
67 ),
68 'NAME' => array(
69 'data_type' => 'string',
70 'required' => true,
71 'validation' => array(__CLASS__, 'validateName'),
72 'title' => Loc::getMessage('TRADING_PLATFORM_EBAY_VARIATION_METADATA_ENTITY_NAME_FIELD'),
73 ),
74 'REQUIRED' => array(
75 'data_type' => 'string',
76 'default_value' => 'N',
77 'validation' => array(__CLASS__, 'validateRequired'),
78 'title' => Loc::getMessage('TRADING_PLATFORM_EBAY_VARIATION_METADATA_ENTITY_REQUIRED_FIELD'),
79 ),
80 'MIN_VALUES' => array(
81 'data_type' => 'integer',
82 'default_value' => 0,
83 'title' => Loc::getMessage('TRADING_PLATFORM_EBAY_VARIATION_METADATA_ENTITY_MIN_VALUES_FIELD'),
84 ),
85 'MAX_VALUES' => array(
86 'data_type' => 'integer',
87 'default_value' => 1,
88 'title' => Loc::getMessage('TRADING_PLATFORM_EBAY_VARIATION_METADATA_ENTITY_MAX_VALUES_FIELD'),
89 ),
90 'SELECTION_MODE' => array(
91 'data_type' => 'string',
92 'required' => true,
93 'validation' => array(__CLASS__, 'validateSelectionMode'),
94 'title' => Loc::getMessage('TRADING_PLATFORM_EBAY_VARIATION_METADATA_ENTITY_SELECTION_MODE_FIELD'),
95 ),
96 'ALLOWED_AS_VARIATION' => array(
97 'data_type' => 'string',
98 'validation' => array(__CLASS__, 'validateAllowedAsVariation'),
99 'title' => Loc::getMessage('TRADING_PLATFORM_EBAY_VARIATION_METADATA_ENTITY_ALLOWED_AS_VARIATION_FIELD'),
100 ),
101 'HELP_URL' => array(
102 'data_type' => 'string',
103 'validation' => array(__CLASS__, 'validateHelpUrl'),
104 'title' => Loc::getMessage('TRADING_PLATFORM_EBAY_VARIATION_METADATA_ENTITY_HELP_URL_FIELD'),
105 ),
106 'VALUE' => array(
107 'data_type' => 'text',
108 'serialized' => true,
109 'title' => Loc::getMessage('TRADING_PLATFORM_EBAY_VARIATION_METADATA_ENTITY_VALUES_FIELD'),
110 ),
111 );
112 }
113 public static function validateName()
114 {
115 return array(
116 new Entity\Validator\Length(null, 255),
117 );
118 }
119 public static function validateValue()
120 {
121 return array(
122 new Entity\Validator\Length(null, 255),
123 );
124 }
125 public static function validateRequired()
126 {
127 return array(
128 new Entity\Validator\Length(null, 1),
129 );
130 }
131 public static function validateSelectionMode()
132 {
133 return array(
134 new Entity\Validator\Length(null, 255),
135 );
136 }
137 public static function validateAllowedAsVariation()
138 {
139 return array(
140 new Entity\Validator\Length(null, 1),
141 );
142 }
143 public static function validateHelpUrl()
144 {
145 return array(
146 new Entity\Validator\Length(null, 255),
147 );
148 }
149}
static loadMessages($file)
Definition loc.php:64
static getMessage($code, $replace=null, $language=null)
Definition loc.php:29