Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
rubrictable.php
1<?php
3
7
35{
41 public static function getTableName()
42 {
43 return 'b_list_rubric';
44 }
45
51 public static function getMap()
52 {
53 return [
54 new Fields\IntegerField(
55 'ID',
56 [
57 'primary' => true,
58 'autocomplete' => true,
59 'title' => Loc::getMessage('RUBRIC_ENTITY_ID_FIELD'),
60 ]
61 ),
62 new Fields\StringField(
63 'LID',
64 [
65 'required' => true,
66 'validation' => [__CLASS__, 'validateLid'],
67 'title' => Loc::getMessage('RUBRIC_ENTITY_LID_FIELD'),
68 ]
69 ),
70 new Fields\StringField(
71 'CODE',
72 [
73 'validation' => [__CLASS__, 'validateCode'],
74 'title' => Loc::getMessage('RUBRIC_ENTITY_CODE_FIELD'),
75 ]
76 ),
77 new Fields\StringField(
78 'NAME',
79 [
80 'validation' => [__CLASS__, 'validateName'],
81 'title' => Loc::getMessage('RUBRIC_ENTITY_NAME_FIELD'),
82 ]
83 ),
84 new Fields\TextField(
85 'DESCRIPTION',
86 [
87 'title' => Loc::getMessage('RUBRIC_ENTITY_DESCRIPTION_FIELD'),
88 ]
89 ),
90 new Fields\IntegerField(
91 'SORT',
92 [
93 'default' => 100,
94 'title' => Loc::getMessage('RUBRIC_ENTITY_SORT_FIELD'),
95 ]
96 ),
97 new Fields\BooleanField(
98 'ACTIVE',
99 [
100 'values' =>['N', 'Y'],
101 'default' => 'Y',
102 'title' => Loc::getMessage('RUBRIC_ENTITY_ACTIVE_FIELD'),
103 ]
104 ),
105 new Fields\BooleanField(
106 'AUTO',
107 [
108 'values' => ['N', 'Y'],
109 'default' => 'N',
110 'title' => Loc::getMessage('RUBRIC_ENTITY_AUTO_FIELD'),
111 ]
112 ),
113 new Fields\StringField(
114 'DAYS_OF_MONTH',
115 [
116 'validation' => [__CLASS__, 'validateDaysOfMonth'],
117 'title' => Loc::getMessage('RUBRIC_ENTITY_DAYS_OF_MONTH_FIELD'),
118 ]
119 ),
120 new Fields\StringField(
121 'DAYS_OF_WEEK',
122 [
123 'validation' => [__CLASS__, 'validateDaysOfWeek'],
124 'title' => Loc::getMessage('RUBRIC_ENTITY_DAYS_OF_WEEK_FIELD'),
125 ]
126 ),
127 new Fields\StringField(
128 'TIMES_OF_DAY',
129 [
130 'validation' => [__CLASS__, 'validateTimesOfDay'],
131 'title' => Loc::getMessage('RUBRIC_ENTITY_TIMES_OF_DAY_FIELD'),
132 ]
133 ),
134 new Fields\StringField(
135 'TEMPLATE',
136 [
137 'validation' => [__CLASS__, 'validateTemplate'],
138 'title' => Loc::getMessage('RUBRIC_ENTITY_TEMPLATE_FIELD'),
139 ]
140 ),
141 new Fields\DatetimeField(
142 'LAST_EXECUTED',
143 [
144 'title' => Loc::getMessage('RUBRIC_ENTITY_LAST_EXECUTED_FIELD'),
145 ]
146 ),
147 new Fields\BooleanField(
148 'VISIBLE',
149 [
150 'values' => ['N', 'Y'],
151 'default' => 'Y',
152 'title' => Loc::getMessage('RUBRIC_ENTITY_VISIBLE_FIELD'),
153 ]
154 ),
155 new Fields\StringField(
156 'FROM_FIELD',
157 [
158 'validation' => [__CLASS__, 'validateFromField'],
159 'title' => Loc::getMessage('RUBRIC_ENTITY_FROM_FIELD_FIELD'),
160 ]
161 ),
163 'SITE',
164 '\Bitrix\Main\Site',
165 ['=this.LID' => 'ref.LID'],
166 ['join_type' => 'LEFT']
167 ),
168 ];
169 }
170
176 public static function validateLid(): array
177 {
178 return [
180 ];
181 }
182
188 public static function validateCode(): array
189 {
190 return [
192 ];
193 }
194
200 public static function validateName(): array
201 {
202 return [
204 ];
205 }
206
212 public static function validateDaysOfMonth(): array
213 {
214 return [
216 ];
217 }
218
224 public static function validateDaysOfWeek(): array
225 {
226 return [
228 ];
229 }
230
236 public static function validateTimesOfDay(): array
237 {
238 return [
240 ];
241 }
242
248 public static function validateTemplate(): array
249 {
250 return [
252 ];
253 }
254
260 public static function validateFromField(): array
261 {
262 return [
264 ];
265 }
266}
static getMessage($code, $replace=null, $language=null)
Definition loc.php:29