Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
FileDuplicateTable.php
1
<?php
8
namespace
Bitrix\Main\File\Internal
;
9
10
use
Bitrix\Main\ORM\Data
;
11
use
Bitrix\Main\ORM\Fields
;
12
29
class
FileDuplicateTable
extends
Data\DataManager
30
{
31
use Data\Internal\MergeTrait;
32
33
public
static
function
getTableName
()
34
{
35
return
'b_file_duplicate'
;
36
}
37
38
public
static
function
getMap
()
39
{
40
return
[
41
(
new
Fields\IntegerField(
"DUPLICATE_ID"
))
42
->configurePrimary(
true
),
43
44
(
new
Fields\IntegerField(
"ORIGINAL_ID"
))
45
->configurePrimary(
true
),
46
47
(
new
Fields\IntegerField(
"COUNTER"
))
48
->configureDefaultValue(1),
49
50
(
new
Fields\BooleanField(
"ORIGINAL_DELETED"
))
51
->configureValues(
"N"
,
"Y"
)
52
->configureDefaultValue(
"N"
),
53
];
54
}
55
59
public
static
function
markDeleted
($originalId)
60
{
61
$originalId = (int)$originalId;
62
$conn = static::getEntity()->getConnection();
63
$table = static::getTableName();
64
65
$conn->query(
"
66
update {$table}
67
set ORIGINAL_DELETED = 'Y'
68
where ORIGINAL_ID = {$originalId} and ORIGINAL_DELETED = 'N'
69
"
);
70
71
static::cleanCache();
72
}
73
}
Bitrix\Main\File\Internal\FileDuplicateTable
Definition
FileDuplicateTable.php:30
Bitrix\Main\File\Internal\FileDuplicateTable\getMap
static getMap()
Definition
FileDuplicateTable.php:38
Bitrix\Main\File\Internal\FileDuplicateTable\markDeleted
static markDeleted($originalId)
Definition
FileDuplicateTable.php:59
Bitrix\Main\File\Internal\FileDuplicateTable\getTableName
static getTableName()
Definition
FileDuplicateTable.php:33
Bitrix\Main\ORM\Data\DataManager
Definition
datamanager.php:33
Bitrix\Main\File\Internal
Definition
FileDuplicateTable.php:8
Bitrix\Main\ORM\Data
Definition
addresult.php:9
Bitrix\Main\ORM\Fields
Definition
arrayfield.php:9
modules
main
lib
File
Internal
FileDuplicateTable.php
Создано системой
1.10.0