Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
fileremoved.php
1<?php
6use \Bitrix\Main\UI\FileInputUtility;
7use \Bitrix\Main\Web\HttpClient;
8use \Bitrix\Main\Web\Uri;
9use \Bitrix\Main\Localization\Loc;
10use \Bitrix\Main\Application;
11
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}
static initHash($file=array())
Definition file.php:75
__construct($package, array $file)