ILIAS  trunk Revision v13.0_alpha-62-g3b72d83f2e5
ilObjFileUploadHandlerGUI Class Reference
+ Inheritance diagram for ilObjFileUploadHandlerGUI:
+ Collaboration diagram for ilObjFileUploadHandlerGUI:

Public Member Functions

 __construct ()
 ilUIDemoFileUploadHandlerGUI constructor. More...
 
 supportsChunkedUploads ()
 
- Public Member Functions inherited from ILIAS\FileUpload\Handler\AbstractCtrlAwareIRSSUploadHandler
 __construct ()
 ilUIDemoFileUploadHandlerGUI constructor. More...
 
 getUploadURL ()
 @inheritDoc More...
 
 getExistingFileInfoURL ()
 @inheritDoc More...
 
 getFileRemovalURL ()
 @inheritDoc 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

 getStakeholder ()
 
 getUploadResult ()
 
 getClassPath ()
 
- Protected Member Functions inherited from ILIAS\FileUpload\Handler\AbstractCtrlAwareIRSSUploadHandler
 getStakeholder ()
 
 getClassPath ()
 
 getUploadResult ()
 
 processChunckedUpload (UploadResult $result)
 
 getRemoveResult (string $identifier)
 
- Protected Member Functions inherited from ILIAS\FileUpload\Handler\AbstractCtrlAwareUploadHandler
 readChunkedInformation ()
 
 getUploadResult ()
 
 getRemoveResult (string $identifier)
 

Private Member Functions

 mayStageUploadForRepository ()
 

Private Attributes

const PARAM_REF_ID = 'ref_id'
 
ilAccessHandler $access
 
ILIAS Refinery Factory $refinery
 
ilObjUser $user
 

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\AbstractCtrlAwareIRSSUploadHandler
FilenameSanitizer $sanitizer
 
ilLanguage $language
 
Services $irss
 
ResourceStakeholder $stakeholder
 
Filesystem $temp_filesystem
 
array $class_path
 
- 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()

ilObjFileUploadHandlerGUI::__construct ( )

ilUIDemoFileUploadHandlerGUI constructor.

Reimplemented from ILIAS\FileUpload\Handler\AbstractCtrlAwareIRSSUploadHandler.

Definition at line 35 of file class.ilObjFileUploadHandlerGUI.php.

36 {
37 global $DIC;
38
39 $this->access = $DIC->access();
40 $this->refinery = $DIC->refinery();
41 $this->user = $DIC->user();
42
44 }
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
global $DIC
Definition: shib_login.php:26

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

+ Here is the call graph for this function:

Member Function Documentation

◆ getClassPath()

ilObjFileUploadHandlerGUI::getClassPath ( )
protected

Reimplemented from ILIAS\FileUpload\Handler\AbstractCtrlAwareIRSSUploadHandler.

Definition at line 83 of file class.ilObjFileUploadHandlerGUI.php.

83 : array
84 {
85 return [self::class];
86 }

◆ getStakeholder()

ilObjFileUploadHandlerGUI::getStakeholder ( )
protected

Reimplemented from ILIAS\FileUpload\Handler\AbstractCtrlAwareIRSSUploadHandler.

Definition at line 46 of file class.ilObjFileUploadHandlerGUI.php.

47 {
48 global $DIC;
49 return new ilObjFileStakeholder($DIC->user()->getId());
50 }
Class ilObjFileStakeholder.

References $DIC.

◆ getUploadResult()

ilObjFileUploadHandlerGUI::getUploadResult ( )
protected

Reimplemented from ILIAS\FileUpload\Handler\AbstractCtrlAwareIRSSUploadHandler.

Definition at line 53 of file class.ilObjFileUploadHandlerGUI.php.

54 {
55 if (!$this->mayStageUploadForRepository()) {
56 return new \ILIAS\FileUpload\Handler\BasicHandlerResult(
58 \ILIAS\FileUpload\Handler\HandlerResult::STATUS_FAILED,
59 '',
60 $this->language->txt('permission_denied')
61 );
62 }
63
64 return parent::getUploadResult();
65 }
Interface Observer \BackgroundTasks Contains several chained tasks and infos about them.

References ILIAS\FileUpload\Handler\AbstractCtrlAwareUploadHandler\getFileIdentifierParameterName(), ILIAS\UI\examples\Symbol\Glyph\Language\language(), and mayStageUploadForRepository().

+ Here is the call graph for this function:

◆ mayStageUploadForRepository()

ilObjFileUploadHandlerGUI::mayStageUploadForRepository ( )
private

Definition at line 67 of file class.ilObjFileUploadHandlerGUI.php.

67 : bool
68 {
69 $query = $this->http->wrapper()->query();
70
71 if ($query->has(self::PARAM_REF_ID)) {
72 $ref_id = $query->retrieve(self::PARAM_REF_ID, $this->refinery->kindlyTo()->int());
73 return $ref_id > 0
74 && $this->access->checkAccess('create_' . ilObjFile::OBJECT_TYPE, '', $ref_id);
75 }
76
77 // No repository target (e.g. personal workspace via wsp_id); the create permission
78 // is enforced in ilObjFileGUI::uploadFiles() for that case. An anonymous user has
79 // no such target and is refused here as well.
80 return !($this->user->isAnonymous() || $this->user->getId() < 1);
81 }
const OBJECT_TYPE
static http()
Fetches the global http state from ILIAS.

References ILIAS\Repository\access(), ILIAS\FileDelivery\http(), ilObjFile\OBJECT_TYPE, ILIAS\Repository\refinery(), and ILIAS\Repository\user().

Referenced by getUploadResult().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ supportsChunkedUploads()

ilObjFileUploadHandlerGUI::supportsChunkedUploads ( )
Returns
bool if this uploadhandler chan handle Chunked Uploads. These come in multiple requests and must be combined to a single file. If your UploadHandler can handle Chunked Uploads, you can use a UI\Component\Input\Field\Upload\File with .

Reimplemented from ILIAS\FileUpload\Handler\AbstractCtrlAwareUploadHandler.

Definition at line 89 of file class.ilObjFileUploadHandlerGUI.php.

89 : bool
90 {
91 return true;
92 }

Field Documentation

◆ $access

ilAccessHandler ilObjFileUploadHandlerGUI::$access
private

Definition at line 31 of file class.ilObjFileUploadHandlerGUI.php.

◆ $refinery

ILIAS Refinery Factory ilObjFileUploadHandlerGUI::$refinery
private

Definition at line 32 of file class.ilObjFileUploadHandlerGUI.php.

◆ $user

ilObjUser ilObjFileUploadHandlerGUI::$user
private

Definition at line 33 of file class.ilObjFileUploadHandlerGUI.php.

◆ PARAM_REF_ID

const ilObjFileUploadHandlerGUI::PARAM_REF_ID = 'ref_id'
private

Definition at line 29 of file class.ilObjFileUploadHandlerGUI.php.


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