19 declare(strict_types=1);
52 $this->storage = $DIC->resourceStorage();
53 $this->wrapper = $DIC->http()->wrapper();
70 $array = $this->
upload->getResults();
71 $result = end($array);
74 if ($this->wrapper->query()->has(
'rid')) {
75 $to_str = $this->
refinery->to()->string();
76 $rid = $this->wrapper->query()->retrieve(
'rid', $to_str);
77 $id = $this->storage->manage()->find($rid);
79 $this->storage->manage()->appendNewRevision(
$id, $result, $this->stakeholder);
84 $i = $this->storage->manage()->upload($result, $this->stakeholder);
85 $rid = $i->serialize();
87 $status = HandlerResult::STATUS_OK;
88 $message =
'Upload ok';
94 $status = HandlerResult::STATUS_FAILED;
96 $message = $result->getStatus()->getMessage();
104 $id = $this->storage->manage()->find($rid);
106 $rev = $this->storage->manage()->getCurrentRevision(
$id);
107 $rev_num = $rev->getVersionNumber();
108 $this->storage->manage()->removeRevision(
$id, $rev_num);
111 HandlerResult::STATUS_OK,
118 HandlerResult::STATUS_FAILED,
126 $id = $this->storage->manage()->find($rid);
130 $r = $this->storage->manage()->getCurrentRevision(
$id)->getInformation();
147 foreach ($resource_identifiers as $rid) {
148 $id = $this->storage->manage()->find($rid);
152 $r = $this->storage->manage()->getCurrentRevision(
$id)->getInformation();
Interface Observer Contains several chained tasks and infos about them.
getRemoveResult(string $rid)
getInfoResult(string $rid)
ilObjFileIconStakeholder $stakeholder
getInfoForExistingFiles(array $resource_identifiers)
__construct()
ilUIDemoFileUploadHandlerGUI constructor.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Class ResourceIdentification.
getFileIdentifierParameterName()
Class BasicHandlerResult.
Interface FileInfoResult.
Class ilCtrlAwareUploadHandler.
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
__construct(Container $dic, ilPlugin $plugin)
Class BasicFileInfoResult.