1C-Bitrix
25.700.0
Загрузка...
Поиск...
Не найдено
copyqueue.php
См. документацию.
1
<?php
2
namespace
Bitrix\Clouds
;
3
4
use
Bitrix\Main\Localization\Loc
;
5
use
Bitrix\Main\ORM\Data\DataManager
;
6
use
Bitrix\Main\ORM\Fields
;
7
31
32
class
CopyQueueTable
extends
DataManager
33
{
34
const
OP_COPY
=
'C'
;
35
const
OP_RENAME
=
'R'
;
36
const
OP_SYNC
=
'S'
;
37
43
public
static
function
getTableName
()
44
{
45
return
'b_clouds_copy_queue'
;
46
}
47
53
public
static
function
getMap
()
54
{
55
return
[
56
new
Fields\IntegerField
(
57
'ID'
,
58
[
59
'primary'
=>
true
,
60
'autocomplete'
=>
true
,
61
'title'
=> Loc::getMessage(
'COPY_QUEUE_ENTITY_ID_FIELD'
),
62
]
63
),
64
new
Fields\DatetimeField
(
65
'TIMESTAMP_X'
,
66
[
67
'required'
=>
true
,
68
'title'
=> Loc::getMessage(
'COPY_QUEUE_ENTITY_TIMESTAMP_X_FIELD'
),
69
]
70
),
71
new
Fields\StringField
(
72
'OP'
,
73
[
74
'required'
=>
true
,
75
'validation'
=> [__CLASS__,
'validateOp'
],
76
'title'
=> Loc::getMessage(
'COPY_QUEUE_ENTITY_OP_FIELD'
),
77
]
78
),
79
new
Fields\IntegerField
(
80
'SOURCE_BUCKET_ID'
,
81
[
82
'required'
=>
true
,
83
'title'
=> Loc::getMessage(
'COPY_QUEUE_ENTITY_SOURCE_BUCKET_ID_FIELD'
),
84
]
85
),
86
new
Fields\StringField
(
87
'SOURCE_FILE_PATH'
,
88
[
89
'required'
=>
true
,
90
'validation'
=> [__CLASS__,
'validateSourceFilePath'
],
91
'title'
=> Loc::getMessage(
'COPY_QUEUE_ENTITY_SOURCE_FILE_PATH_FIELD'
),
92
]
93
),
94
new
Fields\IntegerField
(
95
'TARGET_BUCKET_ID'
,
96
[
97
'required'
=>
true
,
98
'title'
=> Loc::getMessage(
'COPY_QUEUE_ENTITY_TARGET_BUCKET_ID_FIELD'
),
99
]
100
),
101
new
Fields\StringField
(
102
'TARGET_FILE_PATH'
,
103
[
104
'required'
=>
true
,
105
'validation'
=> [__CLASS__,
'validateTargetFilePath'
],
106
'title'
=> Loc::getMessage(
'COPY_QUEUE_ENTITY_TARGET_FILE_PATH_FIELD'
),
107
]
108
),
109
new
Fields\IntegerField
(
110
'FILE_SIZE'
,
111
[
112
'default'
=> -1,
113
'title'
=> Loc::getMessage(
'COPY_QUEUE_ENTITY_FILE_SIZE_FIELD'
),
114
]
115
),
116
new
Fields\IntegerField
(
117
'FILE_POS'
,
118
[
119
'default'
=> 0,
120
'title'
=> Loc::getMessage(
'COPY_QUEUE_ENTITY_FILE_POS_FIELD'
),
121
]
122
),
123
new
Fields\IntegerField
(
124
'FAIL_COUNTER'
,
125
[
126
'default'
=> 0,
127
'title'
=> Loc::getMessage(
'COPY_QUEUE_ENTITY_FAIL_COUNTER_FIELD'
),
128
]
129
),
130
new
Fields\BooleanField
(
131
'STATUS'
,
132
[
133
'values'
=> [
'N'
,
'Y'
],
134
'default'
=>
'Y'
,
135
'title'
=> Loc::getMessage(
'COPY_QUEUE_ENTITY_STATUS_FIELD'
),
136
]
137
),
138
new
Fields\StringField
(
139
'ERROR_MESSAGE'
,
140
[
141
'validation'
=> [__CLASS__,
'validateErrorMessage'
],
142
'title'
=> Loc::getMessage(
'COPY_QUEUE_ENTITY_ERROR_MESSAGE_FIELD'
),
143
]
144
),
145
new
Fields\Relations\Reference
(
146
'SOURCE_BUCKET'
,
147
'\Bitrix\Clouds\FileBucket'
,
148
[
'=this.SOURCE_BUCKET_ID'
=>
'ref.ID'
],
149
[
'join_type'
=>
'LEFT'
]
150
),
151
new
Fields\Relations\Reference
(
152
'TARGET_BUCKET'
,
153
'\Bitrix\Clouds\FileBucket'
,
154
[
'=this.TARGET_BUCKET_ID'
=>
'ref.ID'
],
155
[
'join_type'
=>
'LEFT'
]
156
),
157
];
158
}
159
165
public
static
function
validateOp
():
array
166
{
167
return
[
168
new
Fields\Validators\LengthValidator
(
null
, 1),
169
];
170
}
171
177
public
static
function
validateSourceFilePath
():
array
178
{
179
return
[
180
new
Fields\Validators\LengthValidator
(
null
, 500),
181
];
182
}
183
189
public
static
function
validateTargetFilePath
():
array
190
{
191
return
[
192
new
Fields\Validators\LengthValidator
(
null
, 500),
193
];
194
}
195
201
public
static
function
validateErrorMessage
():
array
202
{
203
return
[
204
new
Fields\Validators\LengthValidator
(
null
, 500),
205
];
206
}
207
}
Bitrix\Clouds\CopyQueueTable
Определения
copyqueue.php:33
Bitrix\Clouds\CopyQueueTable\OP_SYNC
const OP_SYNC
Определения
copyqueue.php:36
Bitrix\Clouds\CopyQueueTable\getMap
static getMap()
Определения
copyqueue.php:53
Bitrix\Clouds\CopyQueueTable\validateSourceFilePath
static validateSourceFilePath()
Определения
copyqueue.php:177
Bitrix\Clouds\CopyQueueTable\OP_COPY
const OP_COPY
Определения
copyqueue.php:34
Bitrix\Clouds\CopyQueueTable\validateTargetFilePath
static validateTargetFilePath()
Определения
copyqueue.php:189
Bitrix\Clouds\CopyQueueTable\validateOp
static validateOp()
Определения
copyqueue.php:165
Bitrix\Clouds\CopyQueueTable\OP_RENAME
const OP_RENAME
Определения
copyqueue.php:35
Bitrix\Clouds\CopyQueueTable\validateErrorMessage
static validateErrorMessage()
Определения
copyqueue.php:201
Bitrix\Clouds\CopyQueueTable\getTableName
static getTableName()
Определения
copyqueue.php:43
Bitrix\Main\Localization\Loc
Определения
loc.php:12
Bitrix\Main\ORM\Data\DataManager
Определения
datamanager.php:35
Bitrix\Main\ORM\Fields\BooleanField
Определения
booleanfield.php:20
Bitrix\Main\ORM\Fields\DatetimeField
Определения
datetimefield.php:22
Bitrix\Main\ORM\Fields\IntegerField
Определения
integerfield.php:20
Bitrix\Main\ORM\Fields\Relations\Reference
Определения
reference.php:26
Bitrix\Main\ORM\Fields\StringField
Определения
stringfield.php:20
Bitrix\Main\ORM\Fields\Validators\LengthValidator
Определения
lengthvalidator.php:19
array
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения
file_new.php:804
Bitrix\Clouds
Определения
copyqueue.php:2
Bitrix\Main\ORM\Fields
Определения
arrayfield.php:9
bitrix
modules
clouds
lib
copyqueue.php
Создано системой
1.14.0