19declare(strict_types=1);
41 $this->storage =
$DIC->resourceStorage();
49 $status = HandlerResult::STATUS_FAILED;
50 $new_identification =
'unknown';
54 $uploadResults = $this->
upload->getResults();
55 $result = end($uploadResults);
57 if ($result instanceof
UploadResult && $result->
isOK() && $result->getSize()) {
58 $resource_id = $this->storage->manage()->find($this->identification);
59 if (is_null($resource_id)) {
60 $new_identification = $this->storage->manage()->upload($result, $this->stakeholder)->serialize();
61 $status = HandlerResult::STATUS_OK;
63 } elseif ($this->identification !==
'') {
64 $this->storage->manage()->replaceWithUpload($resource_id, $result, $this->stakeholder);
66 $status = HandlerResult::STATUS_OK;
82 HandlerResult::STATUS_OK,
84 'asynchronous removal blocked'
90 if (
null !== (
$id = $this->storage->manage()->find($identifier))) {
91 $revision = $this->storage->manage()->getCurrentRevision(
$id)->getInformation();
92 $title = $revision->getTitle();
94 $mime = $revision->getMimeType();
96 $title = $mime =
'unknown';
112 foreach ($file_ids as $identifier) {
116 return $info_results;
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Class ilCtrlAwareUploadHandler.
getFileIdentifierParameterName()
@inheritDoc
Class BasicFileInfoResult.
Class BasicHandlerResult.
__construct(string $identification)
getInfoResult(string $identifier)
getInfoForExistingFiles(array $file_ids)
getRemoveResult(string $identifier)
ilMDCopyrightImageStakeholder $stakeholder
Interface FileInfoResult.
Interface ResourceStakeholder.
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc