19 declare(strict_types=1);
44 $this->storage = $DIC->resourceStorage();
52 $status = HandlerResult::STATUS_FAILED;
53 $new_identification =
'unknown';
57 $uploadResults = $this->
upload->getResults();
58 $result = end($uploadResults);
60 if ($result instanceof
UploadResult && $result->
isOK() && $result->getSize()) {
61 $resource_id = $this->storage->manage()->find($this->identification);
62 if (is_null($resource_id)) {
63 $new_identification = $this->storage->manage()->upload($result, $this->stakeholder)->serialize();
64 $status = HandlerResult::STATUS_OK;
66 } elseif ($this->identification !==
'') {
67 $this->storage->manage()->replaceWithUpload($resource_id, $result, $this->stakeholder);
69 $status = HandlerResult::STATUS_OK;
85 HandlerResult::STATUS_OK,
87 'asynchronous removal blocked' 93 if (null !== (
$id = $this->storage->manage()->find($identifier))) {
94 $revision = $this->storage->manage()->getCurrentRevision(
$id)->getInformation();
95 $title = $revision->getTitle();
97 $mime = $revision->getMimeType();
99 $title = $mime =
'unknown';
115 foreach ($file_ids as $identifier) {
119 return $info_results;
getRemoveResult(string $identifier)
__construct(string $identification)
getInfoForExistingFiles(array $file_ids)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Class BasicHandlerResult.
ilMDCopyrightImageUploadHandlerGUI: ilMDCopyrightSelectionGUI
Interface FileInfoResult.
Class ilCtrlAwareUploadHandler.
ilMDCopyrightImageStakeholder $stakeholder
getFileIdentifierParameterName()
getInfoResult(string $identifier)
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Class BasicFileInfoResult.