Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
fileremoved.php
1
<?php
2
namespace
Bitrix\Main\UI\Uploader
;
3
use
Bitrix\Main\Error
;
4
use
Bitrix\Main\ErrorCollection
;
5
use
Bitrix\Main\Result
;
6
use \Bitrix\Main\UI\FileInputUtility;
7
use \Bitrix\Main\Web\HttpClient;
8
use \Bitrix\Main\Web\Uri;
9
use \Bitrix\Main\Localization\Loc;
10
use \Bitrix\Main\Application;
11
12
class
FileRemoved
13
{
15
protected
$package
;
17
protected
$data
= array();
18
24
public
function
__construct
(
$package
, array $file)
25
{
26
$hash =
File::initHash
(array(
"id"
=> $file[
"id"
],
"name"
=> $file[
"name"
]));
27
$this->data = array(
28
"hash"
=> $hash,
29
"id"
=> $file[
"id"
],
30
"uploadStatus"
=>
'removed'
,
31
"name"
=> $file[
"name"
],
32
);
33
34
$this->
package
= $package;
35
36
FileInputUtility::instance
()->unRegisterFile($this->package->getCid(), $this->getHash());
37
}
38
42
public
function
getId
()
43
{
44
return
$this->data[
"id"
];
45
}
46
50
public
function
getHash
()
51
{
52
return
$this->data[
"hash"
];
53
}
57
public
function
getName
()
58
{
59
return
$this->data[
"name"
];
60
}
61
66
public
function
toArray
()
67
{
68
return
$this->data
;
69
}
70
71
public
function
isUploaded
()
72
{
73
return
true
;
74
}
75
76
public
function
hasError
()
77
{
78
return
false
;
79
}
80
}
Bitrix\Main\ErrorCollection
Definition
errorcollection.php:14
Bitrix\Main\Error
Definition
error.php:14
Bitrix\Main\ORM\Data\Result
Definition
result.php:16
Bitrix\Main\UI\FileInputUtility\instance
static instance()
Definition
fileinpututility.php:17
Bitrix\Main\UI\Uploader\File\initHash
static initHash($file=array())
Definition
file.php:75
Bitrix\Main\UI\Uploader\FileRemoved
Definition
fileremoved.php:13
Bitrix\Main\UI\Uploader\FileRemoved\getHash
getHash()
Definition
fileremoved.php:50
Bitrix\Main\UI\Uploader\FileRemoved\__construct
__construct($package, array $file)
Definition
fileremoved.php:24
Bitrix\Main\UI\Uploader\FileRemoved\getId
getId()
Definition
fileremoved.php:42
Bitrix\Main\UI\Uploader\FileRemoved\isUploaded
isUploaded()
Definition
fileremoved.php:71
Bitrix\Main\UI\Uploader\FileRemoved\$package
$package
Definition
fileremoved.php:15
Bitrix\Main\UI\Uploader\FileRemoved\getName
getName()
Definition
fileremoved.php:57
Bitrix\Main\UI\Uploader\FileRemoved\toArray
toArray()
Definition
fileremoved.php:66
Bitrix\Main\UI\Uploader\FileRemoved\$data
$data
Definition
fileremoved.php:17
Bitrix\Main\UI\Uploader\FileRemoved\hasError
hasError()
Definition
fileremoved.php:76
Bitrix\Main\UI\Uploader
Definition
errorcatcher.php:2
modules
main
lib
ui
uploader
fileremoved.php
Создано системой
1.10.0