Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
sharinglinktable.php
1
<?php
2
namespace
Bitrix\Calendar\Internals
;
3
4
use Bitrix\Main\Entity\ReferenceField;
5
use Bitrix\Main\Entity\TextField;
6
use
Bitrix\Main\ORM\Data\DataManager
;
7
use
Bitrix\Main\ORM\Fields\BooleanField
;
8
use
Bitrix\Main\ORM\Fields\DatetimeField
;
9
use
Bitrix\Main\ORM\Fields\IntegerField
;
10
use
Bitrix\Main\ORM\Fields\Relations\OneToMany
;
11
use
Bitrix\Main\ORM\Fields\Relations\Reference
;
12
use
Bitrix\Main\ORM\Fields\StringField
;
13
use
Bitrix\Main\ORM\Fields\Validators\LengthValidator
;
14
use
Bitrix\Main\ORM\Query\Join
;
15
54
class
SharingLinkTable
extends
DataManager
55
{
61
public
static
function
getTableName
()
62
{
63
return
'b_calendar_sharing_link'
;
64
}
65
71
public
static
function
getMap
()
72
{
73
return
[
74
(
new
IntegerField
(
'ID'
,
75
[]
76
))
77
->configurePrimary(
true
)
78
->configureAutocomplete(
true
)
79
,
80
(
new
IntegerField
(
'OBJECT_ID'
,
81
[]
82
))
83
->configureRequired(
true
)
84
,
85
(
new
StringField
(
'OBJECT_TYPE'
,
86
[
87
'validation'
=> [__CLASS__,
'validateObjectType'
]
88
]
89
))
90
->configureRequired(
true
)
91
,
92
(
new
StringField
(
'HASH'
,
93
[
94
'validation'
=> [__CLASS__,
'validateHash'
]
95
]
96
))
97
->configureRequired(
true
)
98
,
99
(
new
TextField
(
'OPTIONS'
,
100
[]
101
))
102
,
103
(
new
BooleanField
(
'ACTIVE'
,
104
[]
105
))
106
->configureValues(
'N'
,
'Y'
)
107
->configureDefaultValue(
'Y'
)
108
,
109
(
new
DatetimeField
(
'DATE_CREATE'
,
110
[]
111
))
112
->configureRequired(
true
)
113
,
114
(
new
DatetimeField
(
'DATE_EXPIRE'
,
115
[]
116
))
117
,
118
(
new
IntegerField
(
'HOST_ID'
,
119
[]
120
))
121
,
122
(
new
IntegerField
(
'OWNER_ID'
,
123
[]
124
))
125
,
126
(
new
StringField
(
'CONFERENCE_ID'
,
127
[
128
'validation'
=> [__CLASS__,
'validateConferenceId'
]
129
]
130
))
131
,
132
(
new
StringField
(
'PARENT_LINK_HASH'
,
133
[
134
'validation'
=> [__CLASS__,
'validateParentLinkHash'
]
135
]
136
))
137
,
138
(
new
IntegerField
(
'CONTACT_ID'
,
139
[]
140
))
141
->configureNullable()
142
,
143
(
new
IntegerField
(
'CONTACT_TYPE'
,
144
[]
145
))
146
->configureNullable()
147
,
148
(
new
StringField
(
'MEMBERS_HASH'
,
149
[
150
'validation'
=> [__CLASS__,
'validateMembersHash'
]
151
]
152
))
153
,
154
(
new
IntegerField
(
'FREQUENT_USE'
,
155
[]
156
))
157
,
158
(
new
OneToMany
(
159
'MEMBERS'
,
160
SharingLinkMemberTable::class,
161
'MEMBER'
,
162
))
163
->configureJoinType(Join::TYPE_LEFT),
164
];
165
}
166
172
public
static
function
validateObjectType
(): array
173
{
174
return
[
175
new
LengthValidator
(
null
, 32),
176
];
177
}
178
184
public
static
function
validateHash
(): array
185
{
186
return
[
187
new
LengthValidator
(
null
, 64),
188
];
189
}
190
196
public
static
function
validateConferenceId
(): array
197
{
198
return
[
199
new
LengthValidator
(
null
, 64),
200
];
201
}
202
208
public
static
function
validateParentLinkHash
(): array
209
{
210
return
[
211
new
LengthValidator
(
null
, 64),
212
];
213
}
214
220
public
static
function
validateMembersHash
(): array
221
{
222
return
[
223
new
LengthValidator
(
null
, 64),
224
];
225
}
226
227
}
Bitrix\Calendar\Internals\SharingLinkTable
Definition
sharinglinktable.php:55
Bitrix\Calendar\Internals\SharingLinkTable\getMap
static getMap()
Definition
sharinglinktable.php:71
Bitrix\Calendar\Internals\SharingLinkTable\validateMembersHash
static validateMembersHash()
Definition
sharinglinktable.php:220
Bitrix\Calendar\Internals\SharingLinkTable\validateParentLinkHash
static validateParentLinkHash()
Definition
sharinglinktable.php:208
Bitrix\Calendar\Internals\SharingLinkTable\validateObjectType
static validateObjectType()
Definition
sharinglinktable.php:172
Bitrix\Calendar\Internals\SharingLinkTable\validateHash
static validateHash()
Definition
sharinglinktable.php:184
Bitrix\Calendar\Internals\SharingLinkTable\getTableName
static getTableName()
Definition
sharinglinktable.php:61
Bitrix\Calendar\Internals\SharingLinkTable\validateConferenceId
static validateConferenceId()
Definition
sharinglinktable.php:196
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\Relations\OneToMany
Definition
onetomany.php:23
Bitrix\Main\ORM\Fields\Relations\Reference
Definition
reference.php:26
Bitrix\Main\ORM\Fields\StringField
Definition
stringfield.php:20
Bitrix\Main\ORM\Fields\TextField
Definition
textfield.php:20
Bitrix\Main\ORM\Fields\Validators\LengthValidator
Definition
lengthvalidator.php:19
Bitrix\Main\ORM\Query\Join
Definition
join.php:19
Bitrix\Calendar\Internals
Definition
access.php:3
modules
calendar
lib
internals
sharinglinktable.php
Создано системой
1.10.0