19 declare(strict_types=1);
51 if ($DIC->http()->wrapper()->query()->has(
'ref_id')) {
52 $transformation = $DIC->refinery()->kindlyTo()->int();
53 $ref_id = $DIC->http()->wrapper()->query()->retrieve(
'ref_id', $transformation);
56 $this->has_access = $this->getAccess(
61 $DIC->ctrl()->setParameterByClass(self::class,
'ref_id',
$ref_id);
72 if ($this->has_access ===
false) {
73 return $this->getAccessFailureResult(
82 $result_array = $this->
upload->getResults();
83 $result = end($result_array);
86 && in_array($result->getMimeType(), Icon::SUPPORTED_MIME_TYPES)
88 $status = HandlerResult::STATUS_OK;
91 rename($result->getPath(), $tempfile);
93 $status = HandlerResult::STATUS_FAILED;
94 $message = $result->getStatus()->getMessage();
107 if ($this->has_access ===
false) {
108 return $this->getAccessFailureResult(
117 HandlerResult::STATUS_OK,
119 'There is nothing to do here.' 125 if ($this->has_access ===
false) {
134 $this->
language->txt(
'custom_icon'),
135 filesize($file_path),
136 MimeType::IMAGE__SVG_XML
getRemoveResult(string $file_name)
__construct()
ilUIDemoFileUploadHandlerGUI constructor.
custom_icon()
description: > Example for rendering custom icons.
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getInfoForExistingFiles(array $file_names)
getFileIdentifierParameterName()
Class BasicHandlerResult.
Interface FileInfoResult.
getInfoResult(string $file_name)
Class ilCtrlAwareUploadHandler.
static ilTempnam(?string $a_temp_path=null)
Returns a unique and non existing Path for e temporary file or directory.
__construct(Container $dic, ilPlugin $plugin)
language()
description: > Example for rendring a language glyph.
Class BasicFileInfoResult.