1 <?php declare(strict_types=1);
38 $this->ctrl = $DIC->ctrl();
39 $this->upload = $DIC->upload();
40 $this->
http = $DIC->http();
49 return self::DEFAULT_FILE_ID_PARAMETER;
58 return $this->ctrl->getLinkTargetByClass([static::class], self::CMD_UPLOAD);
67 return $this->ctrl->getLinkTargetByClass([static::class], self::CMD_INFO);
76 return $this->ctrl->getLinkTargetByClass([static::class], self::CMD_REMOVE);
82 switch ($this->ctrl->getCmd()) {
83 case self::CMD_UPLOAD:
90 case self::CMD_REMOVE:
100 $content = json_encode($this->
getInfoResult($file_identifier));
108 $this->
http->sendResponse();
109 $this->
http->close();
executeCommand()
Since this is a ilCtrl aware UploadHandler executeCommand MUST be implemented.
static http()
Fetches the global http state from ILIAS.
static ofString($string)
Creates a new stream with an initial value.
getRemoveResult(string $identifier)
getInfoResult(string $identifier)
Class ilCtrlAwareUploadHandler.
Interface FileInfoResult.
Class ilCtrlAwareUploadHandler.
__construct()
ilUIDemoFileUploadHandlerGUI constructor.
getFileIdentifierParameterName()
getInfoForExistingFiles(array $file_ids)
Exercise XML Parser which completes/updates a given file by an xml string.