Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
sectionconnectiontable.php
1
<?php
2
namespace
Bitrix\Calendar\Internals
;
3
4
use Bitrix\Dav\Internals\DavConnectionTable;
5
use
Bitrix\Main\ArgumentException
;
6
use Bitrix\Main\Entity\IntegerField;
7
use Bitrix\Main\Entity\ReferenceField;
8
use Bitrix\Main\Entity\TextField;
9
use
Bitrix\Main\Localization\Loc
;
10
use
Bitrix\Main\ORM\Data\DataManager
;
11
use
Bitrix\Main\ORM\Fields\BooleanField
;
12
use
Bitrix\Main\ORM\Fields\DatetimeField
;
13
use
Bitrix\Main\ORM\Fields\StringField
;
14
use
Bitrix\Main\ORM\Query\Join
;
15
use
Bitrix\Main\SystemException
;
16
17
// TODO: Add description for class
34
class
SectionConnectionTable
extends
DataManager
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
}
Bitrix\Calendar\Internals\SectionConnectionTable
Definition
sectionconnectiontable.php:35
Bitrix\Calendar\Internals\SectionConnectionTable\getMap
static getMap()
Definition
sectionconnectiontable.php:45
Bitrix\Calendar\Internals\SectionConnectionTable\getTableName
static getTableName()
Definition
sectionconnectiontable.php:36
Bitrix\Main\ArgumentException
Definition
exception.php:34
Bitrix\Main\Localization\Loc
Definition
loc.php:11
Bitrix\Main\Localization\Loc\getMessage
static getMessage($code, $replace=null, $language=null)
Definition
loc.php:29
Bitrix\Main\ORM\Data\DataManager
Definition
datamanager.php:33
Bitrix\Main\ORM\Fields\BooleanField
Definition
booleanfield.php:20
Bitrix\Main\ORM\Fields\DatetimeField
Definition
datetimefield.php:22
Bitrix\Main\ORM\Fields\IntegerField
Definition
integerfield.php:20
Bitrix\Main\ORM\Fields\StringField
Definition
stringfield.php:20
Bitrix\Main\ORM\Fields\TextField
Definition
textfield.php:20
Bitrix\Main\ORM\Query\Join
Definition
join.php:19
Bitrix\Main\SystemException
Definition
exception.php:8
Bitrix\Calendar\Internals
Definition
access.php:3
modules
calendar
lib
internals
sectionconnectiontable.php
Создано системой
1.10.0