Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
pushtable.php
1
<?php
2
namespace
Bitrix\Calendar\Internals
;
3
4
use
Bitrix\Main
;
5
use
Bitrix\Main\Localization\Loc
;
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\StringField
;
11
use
Bitrix\Main\ORM\Fields\EnumField
;
12
use
Bitrix\Main\ORM\Fields\Validators\LengthValidator
;
13
14
Loc::loadMessages
(__FILE__);
15
46
class
PushTable
extends
Main\Entity\DataManager
47
{
53
public
static
function
getTableName
()
54
{
55
return
'b_calendar_push'
;
56
}
57
63
public
static
function
getMap
()
64
{
65
return
[
66
(
new
StringField
(
'ENTITY_TYPE'
,
67
[
68
'validation'
=> [__CLASS__,
'validateEntityType'
]
69
]
70
))
71
->configureTitle(
Loc::getMessage
(
'PUSH_ENTITY_ENTITY_TYPE_FIELD'
))
72
->configurePrimary(
true
)
73
,
74
(
new
IntegerField
(
'ENTITY_ID'
))
75
->configureTitle(
Loc::getMessage
(
'PUSH_ENTITY_ENTITY_ID_FIELD'
))
76
->configurePrimary(
true
)
77
,
78
(
new
StringField
(
'CHANNEL_ID'
,
79
[
80
'validation'
=> [__CLASS__,
'validateChannelId'
]
81
]
82
))
83
->configureTitle(
Loc::getMessage
(
'PUSH_ENTITY_CHANNEL_ID_FIELD'
))
84
->configureRequired(
true
)
85
,
86
(
new
StringField
(
'RESOURCE_ID'
,
87
[
88
'validation'
=> [__CLASS__,
'validateResourceId'
]
89
]
90
))
91
->configureTitle(
Loc::getMessage
(
'PUSH_ENTITY_RESOURCE_ID_FIELD'
))
92
->configureRequired(
true
)
93
,
94
(
new
DatetimeField
(
'EXPIRES'
))
95
->configureTitle(
Loc::getMessage
(
'PUSH_ENTITY_EXPIRES_FIELD'
))
96
->configureRequired(
true
)
97
,
98
(
new
EnumField
(
'NOT_PROCESSED'
))
99
->configureTitle(
Loc::getMessage
(
'PUSH_ENTITY_NOT_PROCESSED_FIELD'
))
100
->configureValues([
'N'
,
'Y'
,
'B'
,
'U'
])
101
->configureDefaultValue(
'N'
)
102
,
103
(
new
DatetimeField
(
'FIRST_PUSH_DATE'
))
104
->configureTitle(
Loc::getMessage
(
'PUSH_ENTITY_FIRST_PUSH_DATE_FIELD'
))
105
,
106
];
107
}
108
114
public
static
function
validateEntityType
(): array
115
{
116
return
[
117
new
LengthValidator
(
null
, 24),
118
];
119
}
120
126
public
static
function
validateChannelId
(): array
127
{
128
return
[
129
new
LengthValidator
(
null
, 128),
130
];
131
}
132
138
public
static
function
validateResourceId
(): array
139
{
140
return
[
141
new
LengthValidator
(
null
, 128),
142
];
143
}
144
}
Bitrix\Calendar\Internals\PushTable
Definition
pushtable.php:47
Bitrix\Calendar\Internals\PushTable\validateResourceId
static validateResourceId()
Definition
pushtable.php:138
Bitrix\Calendar\Internals\PushTable\getMap
static getMap()
Definition
pushtable.php:63
Bitrix\Calendar\Internals\PushTable\validateEntityType
static validateEntityType()
Definition
pushtable.php:114
Bitrix\Calendar\Internals\PushTable\validateChannelId
static validateChannelId()
Definition
pushtable.php:126
Bitrix\Calendar\Internals\PushTable\getTableName
static getTableName()
Definition
pushtable.php:53
Bitrix\Main\Localization\Loc
Definition
loc.php:11
Bitrix\Main\Localization\Loc\loadMessages
static loadMessages($file)
Definition
loc.php:64
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\EnumField
Definition
enumfield.php:20
Bitrix\Main\ORM\Fields\IntegerField
Definition
integerfield.php:20
Bitrix\Main\ORM\Fields\StringField
Definition
stringfield.php:20
Bitrix\Main\ORM\Fields\Validators\LengthValidator
Definition
lengthvalidator.php:19
Bitrix\Calendar\Internals
Definition
access.php:3
Bitrix\Main
modules
calendar
lib
internals
pushtable.php
Создано системой
1.10.0