Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
section.php
1<?php
3
6use Bitrix\Main\Entity\ReferenceField;
7
56class SectionTable extends Main\Entity\DataManager
57{
63 public static function getTableName()
64 {
65 return 'b_calendar_section';
66 }
67
73 public static function getMap()
74 {
75 return array(
76 'ID' => array(
77 'data_type' => 'integer',
78 'primary' => true,
79 'autocomplete' => true,
80 'title' => Loc::getMessage('SECTION_ENTITY_ID_FIELD'),
81 ),
82 'NAME' => array(
83 'data_type' => 'string',
84 'validation' => array(__CLASS__, 'validateName'),
85 'title' => Loc::getMessage('SECTION_ENTITY_NAME_FIELD'),
86 ),
87 'XML_ID' => array(
88 'data_type' => 'string',
89 'validation' => array(__CLASS__, 'validateXmlId'),
90 'title' => Loc::getMessage('SECTION_ENTITY_XML_ID_FIELD'),
91 ),
92 'EXTERNAL_ID' => array(
93 'data_type' => 'string',
94 'validation' => array(__CLASS__, 'validateExternalId'),
95 'title' => Loc::getMessage('SECTION_ENTITY_EXTERNAL_ID_FIELD'),
96 ),
97 'ACTIVE' => array(
98 'data_type' => 'boolean',
99 'values' => array('N', 'Y'),
100 'title' => Loc::getMessage('SECTION_ENTITY_ACTIVE_FIELD'),
101 ),
102 'DESCRIPTION' => array(
103 'data_type' => 'text',
104 'title' => Loc::getMessage('SECTION_ENTITY_DESCRIPTION_FIELD'),
105 ),
106 'COLOR' => array(
107 'data_type' => 'string',
108 'validation' => array(__CLASS__, 'validateColor'),
109 'title' => Loc::getMessage('SECTION_ENTITY_COLOR_FIELD'),
110 ),
111 'TEXT_COLOR' => array(
112 'data_type' => 'string',
113 'validation' => array(__CLASS__, 'validateTextColor'),
114 'title' => Loc::getMessage('SECTION_ENTITY_TEXT_COLOR_FIELD'),
115 ),
116 'EXPORT' => array(
117 'data_type' => 'string',
118 'validation' => array(__CLASS__, 'validateExport'),
119 'title' => Loc::getMessage('SECTION_ENTITY_EXPORT_FIELD'),
120 ),
121 'SORT' => array(
122 'data_type' => 'integer',
123 'title' => Loc::getMessage('SECTION_ENTITY_SORT_FIELD'),
124 ),
125 'CAL_TYPE' => array(
126 'data_type' => 'string',
127 'validation' => array(__CLASS__, 'validateCalType'),
128 'title' => Loc::getMessage('SECTION_ENTITY_CAL_TYPE_FIELD'),
129 ),
130 'OWNER_ID' => array(
131 'data_type' => 'integer',
132 'title' => Loc::getMessage('SECTION_ENTITY_OWNER_ID_FIELD'),
133 ),
134 'CREATED_BY' => array(
135 'data_type' => 'integer',
136 'required' => true,
137 'title' => Loc::getMessage('SECTION_ENTITY_CREATED_BY_FIELD'),
138 ),
139 'PARENT_ID' => array(
140 'data_type' => 'integer',
141 'title' => Loc::getMessage('SECTION_ENTITY_PARENT_ID_FIELD'),
142 ),
143 'DATE_CREATE' => array(
144 'data_type' => 'datetime',
145 'title' => Loc::getMessage('SECTION_ENTITY_DATE_CREATE_FIELD'),
146 ),
147 'TIMESTAMP_X' => array(
148 'data_type' => 'datetime',
149 'title' => Loc::getMessage('SECTION_ENTITY_TIMESTAMP_X_FIELD'),
150 ),
151 'DAV_EXCH_CAL' => array(
152 'data_type' => 'string',
153 'validation' => array(__CLASS__, 'validateDavExchCal'),
154 'title' => Loc::getMessage('SECTION_ENTITY_DAV_EXCH_CAL_FIELD'),
155 ),
156 'DAV_EXCH_MOD' => array(
157 'data_type' => 'string',
158 'validation' => array(__CLASS__, 'validateDavExchMod'),
159 'title' => Loc::getMessage('SECTION_ENTITY_DAV_EXCH_MOD_FIELD'),
160 ),
161 'CAL_DAV_CON' => array(
162 'data_type' => 'string',
163 'validation' => array(__CLASS__, 'validateCalDavCon'),
164 'title' => Loc::getMessage('SECTION_ENTITY_CAL_DAV_CON_FIELD'),
165 ),
166 'CAL_DAV_CAL' => array(
167 'data_type' => 'string',
168 'validation' => array(__CLASS__, 'validateCalDavCal'),
169 'title' => Loc::getMessage('SECTION_ENTITY_CAL_DAV_CAL_FIELD'),
170 ),
171 'CAL_DAV_MOD' => array(
172 'data_type' => 'string',
173 'validation' => array(__CLASS__, 'validateCalDavMod'),
174 'title' => Loc::getMessage('SECTION_ENTITY_CAL_DAV_MOD_FIELD'),
175 ),
176 'IS_EXCHANGE' => array(
177 'data_type' => 'string',
178 'validation' => array(__CLASS__, 'validateIsExchange'),
179 'title' => Loc::getMessage('SECTION_ENTITY_IS_EXCHANGE_FIELD'),
180 ),
181 'GAPI_CALENDAR_ID' => array(
182 'data_type' => 'string',
183 'validation' => array(__CLASS__, 'validateGapiCalendarId'),
184 'title' => Loc::getMessage('SECTION_ENTITY_GAPI_CALENDAR_ID_FIELD'),
185 ),
186 'SYNC_TOKEN' => array(
187 'data_type' => 'string',
188 'validation' => array(__CLASS__, 'validateSyncToken'),
189 'title' => Loc::getMessage('SECTION_ENTITY_SYNC_TOKEN_FIELD'),
190 ),
191 'PAGE_TOKEN' => array(
192 'data_type' => 'string',
193 'validation' => array(__CLASS__, 'validatePageToken'),
194 'title' => Loc::getMessage('SECTION_ENTITY_PAGE_TOKEN_FIELD'),
195 ),
196 'EXTERNAL_TYPE' => array(
197 'data_type' => 'string',
198 'validation' => array(__CLASS__, 'validateExternalType'),
199 'title' => Loc::getMessage('SECTION_ENTITY_EXTERNAL_TYPE_FIELD'),
200 ),
201 );
202 }
208 public static function validateName()
209 {
210 return array(
211 new Main\Entity\Validator\Length(null, 255),
212 );
213 }
219 public static function validateXmlId()
220 {
221 return array(
222 new Main\Entity\Validator\Length(null, 100),
223 );
224 }
230 public static function validateExternalId()
231 {
232 return array(
233 new Main\Entity\Validator\Length(null, 100),
234 );
235 }
241 public static function validateColor()
242 {
243 return array(
244 new Main\Entity\Validator\Length(null, 10),
245 );
246 }
252 public static function validateTextColor()
253 {
254 return array(
255 new Main\Entity\Validator\Length(null, 10),
256 );
257 }
263 public static function validateExport()
264 {
265 return array(
266 new Main\Entity\Validator\Length(null, 255),
267 );
268 }
274 public static function validateCalType()
275 {
276 return array(
277 new Main\Entity\Validator\Length(null, 100),
278 );
279 }
285 public static function validateDavExchCal()
286 {
287 return array(
288 new Main\Entity\Validator\Length(null, 255),
289 );
290 }
296 public static function validateDavExchMod()
297 {
298 return array(
299 new Main\Entity\Validator\Length(null, 255),
300 );
301 }
307 public static function validateCalDavCon()
308 {
309 return array(
310 new Main\Entity\Validator\Length(null, 255),
311 );
312 }
318 public static function validateCalDavCal()
319 {
320 return array(
321 new Main\Entity\Validator\Length(null, 255),
322 );
323 }
329 public static function validateCalDavMod()
330 {
331 return array(
332 new Main\Entity\Validator\Length(null, 255),
333 );
334 }
340 public static function validateIsExchange()
341 {
342 return array(
343 new Main\Entity\Validator\Length(null, 1),
344 );
345 }
351 public static function validateGapiCalendarId()
352 {
353 return array(
354 new Main\Entity\Validator\Length(null, 255),
355 );
356 }
362 public static function validateSyncToken()
363 {
364 return array(
365 new Main\Entity\Validator\Length(null, 100),
366 );
367 }
372 public static function validatePageToken()
373 {
374 return array(
375 new Main\Entity\Validator\Length(null, 100),
376 );
377 }
383 public static function validateExternalType()
384 {
385 return array(
386 new Main\Entity\Validator\Length(null, 20),
387 );
388 }
389}
static getMessage($code, $replace=null, $language=null)
Definition loc.php:29