ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
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 41 of file class.ilSkillProfileUploadHandlerGUI.php.

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

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

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

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

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

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

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

◆ $storage

ResourceStorage ilSkillProfileUploadHandlerGUI::$storage
private

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


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