Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
sectionconnectiontable.php
1<?php
3
4use Bitrix\Dav\Internals\DavConnectionTable;
6use Bitrix\Main\Entity\IntegerField;
7use Bitrix\Main\Entity\ReferenceField;
8use Bitrix\Main\Entity\TextField;
16
17// TODO: Add description for class
35{
36 public static function getTableName()
37 {
38 return 'b_calendar_section_connection';
39 }
40
45 public static function getMap()
46 {
47 return [
48 (new IntegerField('ID'))
49 ->configurePrimary()
50 ->configureAutocomplete()
51 ->configureTitle(Loc::getMessage('CALENDAR_SYNC_SCONNECTION_FIELD_ID'))
52 ,
53 (new IntegerField('SECTION_ID'))
54 ->configureRequired()
55 ->configureTitle(Loc::getMessage('CALENDAR_SYNC_SCONNECTION_FIELD_SECTION_ID'))
56 ,
57 (new IntegerField('CONNECTION_ID'))
58 ->configureRequired()
59 ->configureTitle(Loc::getMessage('CALENDAR_SYNC_SCONNECTION_FIELD_CONNECTION_ID'))
60 ,
61 (new StringField('VENDOR_SECTION_ID'))
62 ->configureRequired()
63 ->configureSize(255)
64 ->configureTitle(Loc::getMessage('CALENDAR_SYNC_SCONNECTION_FIELD_VENDOR_SECTION_ID'))
65 ,
66 (new TextField('SYNC_TOKEN'))
67 ->configureNullable()
68 ->configureTitle(Loc::getMessage('CALENDAR_SYNC_SCONNECTION_FIELD_SYNC_TOKEN'))
69 ,
70 (new TextField('PAGE_TOKEN'))
71 ->configureNullable()
72 ->configureTitle(Loc::getMessage('CALENDAR_SYNC_SCONNECTION_FIELD_PAGE_TOKEN'))
73 ,
74 (new BooleanField('ACTIVE'))
75 ->configureRequired()
76 ->configureStorageValues('N', 'Y')
77 ->configureDefaultValue('Y')
78 ->configureTitle(Loc::getMessage('CALENDAR_SYNC_SCONNECTION_FIELD_ACTIVE'))
79 ,
80 (new DatetimeField('LAST_SYNC_DATE'))
81 ->configureNullable()
82 ->configureTitle(Loc::getMessage('CALENDAR_SYNC_SCONNECTION_FIELD_LAST_SYNC_DATE'))
83 ,
84 (new StringField('LAST_SYNC_STATUS'))
85 ->configureNullable()
86 ->configureSize(10)
87 ->configureTitle(Loc::getMessage('CALENDAR_SYNC_SCONNECTION_FIELD_LAST_SYNC_STATUS'))
88 ,
89 (new StringField('VERSION_ID'))
90 ->configureNullable()
91 ->configureSize(255)
92 ->configureTitle(Loc::getMessage('CALENDAR_SYNC_SCONNECTION_FIELD_VERSION'))
93 ,
94 (new ReferenceField(
95 'SECTION',
96 SectionTable::class,
97 Join::on('this.SECTION_ID', 'ref.ID'),
98 ))
99 ->configureTitle(Loc::getMessage('CALENDAR_SYNC_SCONNECTION_FIELD_SECTION'))
100 ,
101 (new ReferenceField(
102 'CONNECTION',
103 DavConnectionTable::class,
104 Join::on('this.CONNECTION_ID', 'ref.ID'),
105 ))
106 ,
107 (new BooleanField('IS_PRIMARY'))
108 ->configureRequired()
109 ->configureStorageValues('N', 'Y')
110 ->configureDefaultValue('N')
111 ->configureTitle(Loc::getMessage('CALENDAR_SYNC_SCONNECTION_FIELD_ACTIVE'))
112 ,
113 ];
114 }
115}
static getMessage($code, $replace=null, $language=null)
Definition loc.php:29