Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
event.php
1<?php
2
3
5
9
26class EventTable extends Main\Entity\DataManager
27{
33 public static function getTableName()
34 {
35 return 'b_calendar_event';
36 }
37
44 public static function getMap()
45 {
46 return array(
47 new Entity\IntegerField('ID', array(
48 'primary' => true,
49 'autocomplete' => true,
50 'title' => Loc::getMessage('SECTION_ENTITY_ID_FIELD'),
51 )),
52 new Entity\IntegerField('PARENT_ID', array(
53 'title' => Loc::getMessage('SECTION_ENTITY_PARENT_ID_FIELD'),
54 )),
55 new Entity\BooleanField('ACTIVE', array(
56 'values' => array('N', 'Y'),
57 'title' => Loc::getMessage('SECTION_ENTITY_ACTIVE_FIELD'),
58 )),
59 new Entity\BooleanField('DELETED', array(
60 'data_type' => 'boolean',
61 'values' => array('N', 'Y'),
62 'title' => Loc::getMessage('SECTION_ENTITY_DELETED_FIELD'),
63 )),
64 new Entity\StringField('CAL_TYPE', array(
65 'validation' => array(__CLASS__, 'validateCalType'),
66 'title' => Loc::getMessage('SECTION_ENTITY_CAL_TYPE_FIELD'),
67 )),
68 new Entity\IntegerField('OWNER_ID', array(
69 'title' => Loc::getMessage('SECTION_ENTITY_OWNER_ID_FIELD'),
70 )),
71 new Entity\StringField('NAME', array(
72 'validation' => array(__CLASS__, 'validateName'),
73 'title' => Loc::getMessage('SECTION_ENTITY_NAME_FIELD'),
74 )),
75 new Entity\DatetimeField('DATE_FROM', array(
76 'title' => Loc::getMessage('SECTION_ENTITY_DATE_FROM_FIELD'),
77 )),
78 new Entity\DatetimeField('DATE_TO', array(
79 'title' => Loc::getMessage('SECTION_ENTITY_DATE_TO_FIELD'),
80 )),
81 new Entity\StringField('TZ_FROM', array(
82 'validation' => array(__CLASS__, 'validateTzFrom'),
83 'title' => Loc::getMessage('SECTION_ENTITY_TZ_FROM_FIELD'),
84 )),
85 new Entity\StringField('TZ_TO', array(
86 'validation' => array(__CLASS__, 'validateTzTo'),
87 'title' => Loc::getMessage('SECTION_ENTITY_TZ_TO_FIELD'),
88 )),
89 new Entity\IntegerField('TZ_OFFSET_FROM', array(
90 'title' => Loc::getMessage('SECTION_ENTITY_TZ_OFFSET_FROM_FIELD'),
91 )),
92 new Entity\IntegerField('TZ_OFFSET_TO', array(
93 'data_type' => 'integer',
94 'title' => Loc::getMessage('SECTION_ENTITY_TZ_OFFSET_TO_FIELD'),
95 )),
96 new Entity\IntegerField('DATE_FROM_TS_UTC', array(
97 'title' => Loc::getMessage('SECTION_ENTITY_DATE_FROM_TS_UTC_FIELD'),
98 )),
99 new Entity\IntegerField('DATE_TO_TS_UTC', array(
100 'title' => Loc::getMessage('SECTION_ENTITY_DATE_TO_TS_UTC_FIELD'),
101 )),
102 new Entity\BooleanField('DT_SKIP_TIME', array(
103 'values' => array('N', 'Y'),
104 'title' => Loc::getMessage('SECTION_ENTITY_DT_SKIP_TIME_FIELD'),
105 )),
106 new Entity\IntegerField('DT_LENGTH', array(
107 'title' => Loc::getMessage('SECTION_ENTITY_DT_LENGTH_FIELD'),
108 )),
109 new Entity\IntegerField('CREATED_BY', array(
110 'required' => true,
111 'title' => Loc::getMessage('SECTION_ENTITY_CREATED_BY_FIELD'),
112 )),
113 new Entity\DatetimeField('DATE_CREATE', array(
114 'title' => Loc::getMessage('SECTION_ENTITY_DATE_CREATE_FIELD'),
115 )),
116 new Entity\DatetimeField('TIMESTAMP_X', array(
117 'title' => Loc::getMessage('SECTION_ENTITY_TIMESTAMP_X_FIELD'),
118 )),
119 new Entity\TextField('DESCRIPTION', array(
120 'title' => Loc::getMessage('SECTION_ENTITY_DESCRIPTION_FIELD'),
121 )),
122 new Entity\StringField('PRIVATE_EVENT', array(
123 'validation' => array(__CLASS__, 'validatePrivateEvent'),
124 'title' => Loc::getMessage('SECTION_ENTITY_PRIVATE_EVENT_FIELD'),
125 )),
126 new Entity\StringField('ACCESSIBILITY', array(
127 'validation' => array(__CLASS__, 'validateAccessibility'),
128 'title' => Loc::getMessage('SECTION_ENTITY_ACCESSIBILITY_FIELD'),
129 )),
130 new Entity\StringField('IMPORTANCE', array(
131 'validation' => array(__CLASS__, 'validateImportance'),
132 'title' => Loc::getMessage('SECTION_ENTITY_IMPORTANCE_FIELD'),
133 )),
134 new Entity\StringField('IS_MEETING', array(
135 'title' => Loc::getMessage('SECTION_ENTITY_IS_MEETING_FIELD'),
136 )),
137 new Entity\StringField('MEETING_STATUS', array(
138 'validation' => array(__CLASS__, 'validateMeetingStatus'),
139 'title' => Loc::getMessage('SECTION_ENTITY_MEETING_STATUS_FIELD'),
140 )),
141 new Entity\IntegerField('MEETING_HOST', array(
142 'title' => Loc::getMessage('SECTION_ENTITY_MEETING_HOST_FIELD'),
143 )),
144 new Entity\StringField('MEETING', array(
145 'title' => Loc::getMessage('SECTION_ENTITY_MEETING_FIELD'),
146 )),
147 new Entity\StringField('LOCATION', array(
148 'validation' => array(__CLASS__, 'validateLocation'),
149 'title' => Loc::getMessage('SECTION_ENTITY_LOCATION_FIELD'),
150 )),
151 new Entity\StringField('REMIND', array(
152 'validation' => array(__CLASS__, 'validateRemind'),
153 'title' => Loc::getMessage('SECTION_ENTITY_REMIND_FIELD'),
154 )),
155 new Entity\StringField('COLOR', array(
156 'validation' => array(__CLASS__, 'validateColor'),
157 'title' => Loc::getMessage('SECTION_ENTITY_COLOR_FIELD'),
158 )),
159 new Entity\StringField('TEXT_COLOR', array(
160 'validation' => array(__CLASS__, 'validateTextColor'),
161 'title' => Loc::getMessage('SECTION_ENTITY_TEXT_COLOR_FIELD'),
162 )),
163 new Entity\StringField('RRULE', array(
164 'validation' => array(__CLASS__, 'validateRrule'),
165 'title' => Loc::getMessage('SECTION_ENTITY_RRULE_FIELD'),
166 )),
167 new Entity\TextField('EXDATE', array(
168 'title' => Loc::getMessage('SECTION_ENTITY_EXDATE_FIELD'),
169 )),
170 new Entity\StringField('DAV_XML_ID', array(
171 'validation' => array(__CLASS__, 'validateDavXmlId'),
172 'title' => Loc::getMessage('SECTION_ENTITY_DAV_XML_ID_FIELD'),
173 )),
174 new Entity\StringField('CAL_DAV_LABEL', array(
175 'title' => Loc::getMessage('SECTION_ENTITY_CAL_DAV_LABEL_FIELD'),
176 )),
177 new Entity\StringField('DAV_EXCH_LABEL', array(
178 'validation' => array(__CLASS__, 'validateDavExchLabel'),
179 'title' => Loc::getMessage('SECTION_ENTITY_DAV_EXCH_LABEL_FIELD'),
180 )),
181 new Entity\StringField('VERSION', array(
182 'validation' => array(__CLASS__, 'validateVersion'),
183 'title' => Loc::getMessage('SECTION_ENTITY_VERSION_FIELD'),
184 )),
185 new Entity\StringField('ATTENDEES_CODES', array(
186 'validation' => array(__CLASS__, 'validateAttendeesCodes'),
187 'title' => Loc::getMessage('SECTION_ENTITY_ATTENDEES_CODES_FIELD'),
188 )),
189 new Entity\IntegerField('RECURRENCE_ID', array(
190 'title' => Loc::getMessage('SECTION_ENTITY_RECURRENCE_ID_FIELD'),
191 )),
192 new Entity\IntegerField('RELATIONS', array(
193 'title' => Loc::getMessage('SECTION_ENTITY_RELATIONS_FIELD'),
194 )),
195 new Entity\TextField('SEARCHABLE_CONTENT', array(
196 'title' => Loc::getMessage('SECTION_ENTITY_SEARCHABLE_CONTENT_FIELD'),
197 )),
198 new Entity\IntegerField('SECTION_ID', array(
199 'title' => Loc::getMessage('SECTION_ENTITY_SECTION_ID_FIELD'),
200 )),
201 new Entity\StringField('G_EVENT_ID', array(
202 'title' => Loc::getMessage('SECTION_ENTITY_G_EVENT_ID_FIELD'),
203 )),
204 new Entity\DatetimeField('ORIGINAL_DATE_FROM', array(
205 'title' => Loc::getMessage('SECTION_ENTITY_ORIGINAL_DATE_FROM_FIELD'),
206 )),
207 new Entity\StringField('SYNC_STATUS', array(
208 'validation' => array(__CLASS__, 'validateSyncStatus'),
209 'title' => Loc::getMessage('SECTION_ENTITY_SYNC_STATUS'),
210 )),
211 new Entity\StringField('EVENT_TYPE', array(
212 'validation' => array(__CLASS__, 'validateEventType'),
213 'title' => Loc::getMessage('SECTION_ENTITY_EVENT_TYPE'),
214 )),
215 );
216 }
217
223 public static function validateName()
224 {
225 return array(
226 new Main\Entity\Validator\Length(null, 255),
227 );
228 }
229
235 public static function validateCalType()
236 {
237 return array(
238 new Main\Entity\Validator\Length(null, 100),
239 );
240 }
241
247 public static function validateEventType()
248 {
249 return array(
250 new Main\Entity\Validator\Length(null, 50),
251 );
252 }
253
259 public static function validateTzFrom()
260 {
261 return array(
262 new Main\Entity\Validator\Length(null, 50),
263 );
264 }
265
271 public static function validateTzTo()
272 {
273 return array(
274 new Main\Entity\Validator\Length(null, 50),
275 );
276 }
277
283 public static function validateAccessibility()
284 {
285 return array(
286 new Main\Entity\Validator\Length(null, 10),
287 );
288 }
289
295 public static function validatePrivateEvent()
296 {
297 return array(
298 new Main\Entity\Validator\Length(null, 10),
299 );
300 }
301
307 public static function validateImportance()
308 {
309 return array(
310 new Main\Entity\Validator\Length(null, 10),
311 );
312 }
313
319 public static function validateColor()
320 {
321 return array(
322 new Main\Entity\Validator\Length(null, 10),
323 );
324 }
325
331 public static function validateTextColor()
332 {
333 return array(
334 new Main\Entity\Validator\Length(null, 10),
335 );
336 }
337
343 public static function validateLocation()
344 {
345 return array(
346 new Main\Entity\Validator\Length(null, 255),
347 );
348 }
349
355 public static function validateRemind()
356 {
357 return array(
358 new Main\Entity\Validator\Length(null, 255),
359 );
360 }
361
367 public static function validateRrule()
368 {
369 return array(
370 new Main\Entity\Validator\Length(null, 255),
371 );
372 }
373
379 public static function validateDavXmlId()
380 {
381 return array(
382 new Main\Entity\Validator\Length(null, 255),
383 );
384 }
385
391 public static function validateDavExchLabel()
392 {
393 return array(
394 new Main\Entity\Validator\Length(null, 255),
395 );
396 }
397
403 public static function validateCalDavLabel()
404 {
405 return array(
406 new Main\Entity\Validator\Length(null, 255),
407 );
408 }
409
415 public static function validateVersion()
416 {
417 return array(
418 new Main\Entity\Validator\Length(null, 255),
419 );
420 }
421
427 public static function validateAttendeesCodes()
428 {
429 return array(
430 new Main\Entity\Validator\Length(null, 255),
431 );
432 }
433
439 public static function validateRelations()
440 {
441 return array(
442 new Main\Entity\Validator\Length(null, 255),
443 );
444 }
445
450 public static function validateMeetingStatus(): array
451 {
452 return [
453 new Main\Entity\Validator\Length(null, 1),
454 ];
455 }
456
461 public static function validateSyncStatus(): array
462 {
463 return array(
464 new Main\Entity\Validator\Length(null, 20),
465 );
466 }
467}
static getMessage($code, $replace=null, $language=null)
Definition loc.php:29