ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilOrgUnitTypeUploadHandlerGUI Class Reference

@ilCtrl_isCalledBy ilOrgUnitTypeUploadHandlerGUI: ilOrgUnitTypeGUI More...

+ Inheritance diagram for ilOrgUnitTypeUploadHandlerGUI:
+ Collaboration diagram for ilOrgUnitTypeUploadHandlerGUI:

Public Member Functions

 __construct (private string $rid="")
 
- Public Member Functions inherited from ilCtrlAwareStorageUploadHandler
 __construct (protected ResourceStakeholder $stakeholder)
 
 getInfoResult (string $identifier)
 
 getInfoForExistingFiles (array $file_ids)
 
- 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

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

Additional Inherited Members

- Data Fields inherited from ILIAS\UI\Component\Input\Field\UploadHandler
const DEFAULT_FILE_ID_PARAMETER = 'file_id'
 
- Protected Attributes inherited from ilCtrlAwareStorageUploadHandler
Services $storage
 
- 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

Constructor & Destructor Documentation

◆ __construct()

ilOrgUnitTypeUploadHandlerGUI::__construct ( private string  $rid = "")

Definition at line 30 of file class.ilOrgUnitTypeUploadHandlerGUI.php.

References ILIAS\GlobalScreen\Provider\__construct().

+ Here is the call graph for this function:

Member Function Documentation

◆ getUploadResult()

ilOrgUnitTypeUploadHandlerGUI::getUploadResult ( )
protected

Reimplemented from ilCtrlAwareStorageUploadHandler.

Definition at line 36 of file class.ilOrgUnitTypeUploadHandlerGUI.php.

37 {
38 foreach ($this->stakeholder->getPreprocessors() as $p) {
39 $this->upload->register($p);
40 }
41
42 $this->upload->process();
43
44 $result_array = $this->upload->getResults();
45 $result = end($result_array);
46
47 if ($result instanceof UploadResult && $result->isOK()) {
48 $resource_identification = $this->storage->manage()->find($this->rid);
49 if ($resource_identification !== null) {
50 $identifier = $this->storage->manage()->replaceWithUpload(
51 $resource_identification,
52 $result,
53 $this->stakeholder
54 )->getIdentification()->serialize();
55 } else {
56 $identifier = $this->storage->manage()->upload($result, $this->stakeholder)->serialize();
57 }
58 $status = HandlerResult::STATUS_OK;
59 $message = "file upload OK";
60 } else {
61 $identifier = '';
62 $status = HandlerResult::STATUS_FAILED;
63 $message = $result->getStatus()->getMessage();
64 }
65
66 return new BasicHandlerResult(
68 $status,
69 $identifier,
71 );
72 }
$message
Definition: xapiexit.php:31

References $message, ILIAS\FileUpload\Handler\AbstractCtrlAwareUploadHandler\getFileIdentifierParameterName(), ILIAS\FileUpload\DTO\UploadResult\isOK(), and ILIAS\Repository\upload().

+ Here is the call graph for this function:

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