ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ILIAS\File\Icon\ilIconUploadHandlerGUI Class Reference
+ Inheritance diagram for ILIAS\File\Icon\ilIconUploadHandlerGUI:
+ Collaboration diagram for ILIAS\File\Icon\ilIconUploadHandlerGUI:

Public Member Functions

 __construct ()
 ilUIDemoFileUploadHandlerGUI constructor. More...
 
 getInfoResult (string $rid)
 
 getInfoForExistingFiles (array $resource_identifiers)
 
- Public Member Functions inherited from ILIAS\FileUpload\Handler\AbstractCtrlAwareUploadHandler
 __construct ()
 ilUIDemoFileUploadHandlerGUI constructor. More...
 
 getFileIdentifierParameterName ()
 @inheritDoc More...
 
 getUploadURL ()
 @inheritDoc More...
 
 getExistingFileInfoURL ()
 @inheritDoc More...
 
 getFileRemovalURL ()
 @inheritDoc More...
 
 executeCommand ()
 Since this is a ilCtrl aware UploadHandler executeCommand MUST be implemented. More...
 
 getInfoResult (string $identifier)
 
 getInfoForExistingFiles (array $file_ids)
 
 supportsChunkedUploads ()
 
 executeCommand ()
 Since this is a ilCtrl aware UploadHandler executeCommand MUST be implemented. More...
 
 getFileIdentifierParameterName ()
 
 getUploadURL ()
 
 getFileRemovalURL ()
 
 getExistingFileInfoURL ()
 
 getInfoForExistingFiles (array $file_ids)
 
 getInfoResult (string $identifier)
 
 supportsChunkedUploads ()
 

Protected Member Functions

 getRemoveResult (string $rid)
 
- Protected Member Functions inherited from ILIAS\FileUpload\Handler\AbstractCtrlAwareUploadHandler
 readChunkedInformation ()
 
 getUploadResult ()
 
 getRemoveResult (string $identifier)
 

Private Attributes

Services $storage
 
ilObjFileIconStakeholder $stakeholder
 
WrapperFactory $wrapper
 
Factory $refinery
 

Additional Inherited Members

- Data Fields inherited from ILIAS\UI\Component\Input\Field\UploadHandler
const DEFAULT_FILE_ID_PARAMETER = 'file_id'
 
- Protected Attributes inherited from ILIAS\FileUpload\Handler\AbstractCtrlAwareUploadHandler
const CMD_UPLOAD = 'upload'
 
const CMD_REMOVE = 'remove'
 
const CMD_INFO = 'info'
 
HttpServices $http
 
ilCtrl $ctrl
 
FileUpload $upload
 
bool $is_chunked = false
 
int $chunk_index = 0
 
int $amount_of_chunks = 0
 
string $chunk_id = null
 
int $chunk_total_size = 0
 

Detailed Description

Author
Lukas Zehnder lukas.nosp@m.@sr..nosp@m.solut.nosp@m.ions

@ilCtrl_isCalledBy ILIAS\File\Icon\ilIconUploadHandlerGUI: ILIAS\File\Icon\ilObjFileIconsOverviewGUI

Definition at line 39 of file class.ilIconUploadHandlerGUI.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\File\Icon\ilIconUploadHandlerGUI::__construct ( )

ilUIDemoFileUploadHandlerGUI constructor.

Reimplemented from ILIAS\FileUpload\Handler\AbstractCtrlAwareUploadHandler.

Definition at line 49 of file class.ilIconUploadHandlerGUI.php.

50 {
51 global $DIC;
53 $this->storage = $DIC->resourceStorage();
54 $this->wrapper = $DIC->http()->wrapper();
55 $this->refinery = $DIC->refinery();
56 $this->stakeholder = new ilObjFileIconStakeholder();
57 }
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
global $DIC
Definition: shib_login.php:26

References $DIC, ILIAS\GlobalScreen\Provider\__construct(), and ILIAS\Repository\refinery().

+ Here is the call graph for this function:

Member Function Documentation

◆ getInfoForExistingFiles()

ILIAS\File\Icon\ilIconUploadHandlerGUI::getInfoForExistingFiles ( array  $resource_identifiers)
Returns
BasicFileInfoResult[]

Reimplemented from ILIAS\FileUpload\Handler\AbstractCtrlAwareUploadHandler.

Definition at line 145 of file class.ilIconUploadHandlerGUI.php.

145 : array
146 {
147 $infos = [];
148 foreach ($resource_identifiers as $rid) {
149 $id = $this->storage->manage()->find($rid);
150 if (!$id instanceof ResourceIdentification) {
151 continue;
152 }
153 $r = $this->storage->manage()->getCurrentRevision($id)->getInformation();
154
155 $infos[] = new BasicFileInfoResult(
157 $rid,
158 $r->getTitle(),
159 $r->getSize(),
160 $r->getMimeType()
161 );
162 }
163
164 return $infos;
165 }
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23

References $id, and ILIAS\FileUpload\Handler\AbstractCtrlAwareUploadHandler\getFileIdentifierParameterName().

+ Here is the call graph for this function:

◆ getInfoResult()

ILIAS\File\Icon\ilIconUploadHandlerGUI::getInfoResult ( string  $identifier)
Returns
null|FileInfoResult for the file with the given identifier or null if the file does not exist.

Reimplemented from ILIAS\FileUpload\Handler\AbstractCtrlAwareUploadHandler.

Definition at line 125 of file class.ilIconUploadHandlerGUI.php.

125 : ?FileInfoResult
126 {
127 $id = $this->storage->manage()->find($rid);
128 if (!$id instanceof ResourceIdentification) {
129 return new BasicFileInfoResult($this->getFileIdentifierParameterName(), 'unknown', 'unknown', 0, 'unknown');
130 }
131 $r = $this->storage->manage()->getCurrentRevision($id)->getInformation();
132
133 return new BasicFileInfoResult(
135 $rid,
136 $r->getTitle(),
137 $r->getSize(),
138 $r->getMimeType()
139 );
140 }

References $id, and ILIAS\FileUpload\Handler\AbstractCtrlAwareUploadHandler\getFileIdentifierParameterName().

+ Here is the call graph for this function:

◆ getRemoveResult()

ILIAS\File\Icon\ilIconUploadHandlerGUI::getRemoveResult ( string  $rid)
protected

Reimplemented from ILIAS\FileUpload\Handler\AbstractCtrlAwareUploadHandler.

Definition at line 103 of file class.ilIconUploadHandlerGUI.php.

103 : HandlerResult
104 {
105 $id = $this->storage->manage()->find($rid);
106 if ($id !== null) {
107 $rev = $this->storage->manage()->getCurrentRevision($id);
108 $rev_num = $rev->getVersionNumber();
109 $this->storage->manage()->removeRevision($id, $rev_num);
110 return new BasicHandlerResult(
113 $rid,
114 'file deleted'
115 );
116 }
117 return new BasicHandlerResult(
120 $rid,
121 'file not found'
122 );
123 }

References $id, ILIAS\FileUpload\Handler\AbstractCtrlAwareUploadHandler\getFileIdentifierParameterName(), ILIAS\FileUpload\Handler\HandlerResult\STATUS_FAILED, and ILIAS\FileUpload\Handler\HandlerResult\STATUS_OK.

+ Here is the call graph for this function:

Field Documentation

◆ $refinery

Factory ILIAS\File\Icon\ilIconUploadHandlerGUI::$refinery
private

Definition at line 44 of file class.ilIconUploadHandlerGUI.php.

◆ $stakeholder

ilObjFileIconStakeholder ILIAS\File\Icon\ilIconUploadHandlerGUI::$stakeholder
private

Definition at line 42 of file class.ilIconUploadHandlerGUI.php.

◆ $storage

Services ILIAS\File\Icon\ilIconUploadHandlerGUI::$storage
private

Definition at line 41 of file class.ilIconUploadHandlerGUI.php.

◆ $wrapper

WrapperFactory ILIAS\File\Icon\ilIconUploadHandlerGUI::$wrapper
private

Definition at line 43 of file class.ilIconUploadHandlerGUI.php.


The documentation for this class was generated from the following file: