ILIAS  release_8 Revision v8.24
ilSkillProfileUploadHandlerGUI Class Reference

Class ilSkillProfileUploadHandlerGUI. More...

+ Inheritance diagram for ilSkillProfileUploadHandlerGUI:
+ Collaboration diagram for ilSkillProfileUploadHandlerGUI:

Public Member Functions

 __construct ()
 ilUIDemoFileUploadHandlerGUI constructor. More...
 
 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

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

Private Attributes

ResourceStorage $storage
 
ilSkillProfileStorageStakeHolder $stakeholder
 

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

Constructor & Destructor Documentation

◆ __construct()

ilSkillProfileUploadHandlerGUI::__construct ( )

ilUIDemoFileUploadHandlerGUI constructor.

Reimplemented from ILIAS\FileUpload\Handler\AbstractCtrlAwareUploadHandler.

Definition at line 40 of file class.ilSkillProfileUploadHandlerGUI.php.

41 {
42 global $DIC;
44 $this->storage = $DIC['resource_storage'];
45 $this->stakeholder = new ilSkillProfileStorageStakeHolder();
46 }
global $DIC
Definition: feed.php:28
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc

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

+ Here is the call graph for this function:

Member Function Documentation

◆ getInfoForExistingFiles()

ilSkillProfileUploadHandlerGUI::getInfoForExistingFiles ( array  $file_ids)
Parameters
array$file_ids
Returns
BasicFileInfoResult[]

Reimplemented from ILIAS\FileUpload\Handler\AbstractCtrlAwareUploadHandler.

Definition at line 99 of file class.ilSkillProfileUploadHandlerGUI.php.

99 : array
100 {
101 $infos = [];
102 foreach ($file_ids as $file_id) {
103 $id = $this->storage->manage()->find($file_id);
104 if ($id === null) {
105 continue;
106 }
107 $r = $this->storage->manage()->getCurrentRevision($id)->getInformation();
108
109 $infos[] = new BasicFileInfoResult($this->getFileIdentifierParameterName(), $file_id, $r->getTitle(), $r->getSize(), $r->getMimeType());
110 }
111
112 return $infos;
113 }
$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()

ilSkillProfileUploadHandlerGUI::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 82 of file class.ilSkillProfileUploadHandlerGUI.php.

83 {
84 $id = $this->storage->manage()->find($identifier);
85 if ($id === null) {
86 return new BasicFileInfoResult($this->getFileIdentifierParameterName(), 'unknown', 'unknown', 0, 'unknown');
87 }
88 $r = $this->storage->manage()->getCurrentRevision($id)->getInformation();
89
90 return new BasicFileInfoResult(
92 $identifier,
93 $r->getTitle(),
94 $r->getSize(),
95 $r->getMimeType()
96 );
97 }

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

+ Here is the call graph for this function:

◆ getRemoveResult()

ilSkillProfileUploadHandlerGUI::getRemoveResult ( string  $identifier)
protected

Reimplemented from ILIAS\FileUpload\Handler\AbstractCtrlAwareUploadHandler.

Definition at line 70 of file class.ilSkillProfileUploadHandlerGUI.php.

70 : HandlerResultInterface
71 {
72 $id = $this->storage->manage()->find($identifier);
73 if ($id !== null) {
74 $this->storage->manage()->remove($id, $this->stakeholder);
75
76 return new BasicHandlerResult($this->getFileIdentifierParameterName(), HandlerResultInterface::STATUS_OK, $identifier, 'file deleted');
77 } else {
78 return new BasicHandlerResult($this->getFileIdentifierParameterName(), HandlerResultInterface::STATUS_FAILED, $identifier, 'file not found');
79 }
80 }

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

+ Here is the call graph for this function:

Field Documentation

◆ $stakeholder

ilSkillProfileStorageStakeHolder ilSkillProfileUploadHandlerGUI::$stakeholder
private

Definition at line 38 of file class.ilSkillProfileUploadHandlerGUI.php.

◆ $storage

ResourceStorage ilSkillProfileUploadHandlerGUI::$storage
private

Definition at line 37 of file class.ilSkillProfileUploadHandlerGUI.php.


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