19 'lti_data',
'provider_icon' 54 return "{$this->providerId}.{$fileExtension}";
78 return implode(DIRECTORY_SEPARATOR, self::$RELATIVE_DIRECTORY_PATH);
86 return implode(DIRECTORY_SEPARATOR, [
96 return implode(DIRECTORY_SEPARATOR, [
131 protected function delete()
147 $minSize = min($width, $height);
149 if (self::MAX_ICON_SIZE) {
150 $minSize = min($minSize, self::MAX_ICON_SIZE);
153 $convertCmd =
"{$this->getAbsoluteFilePath()}[0]";
154 $convertCmd .=
" -geometry {$minSize}x{$minSize}^ -gravity center";
155 $convertCmd .=
" -extent {$minSize}x{$minSize}";
156 $convertCmd .=
" {$this->getAbsoluteFilePath()}";
167 protected function save(
string $uploadFile)
171 if ($DIC->upload()->hasUploads()) {
172 if (!$DIC->upload()->hasBeenProcessed()) {
173 $DIC->upload()->process();
178 $results = $DIC->upload()->getResults();
184 $fileExtentsion = pathinfo(
$result->getName(), PATHINFO_EXTENSION);
187 $DIC->upload()->moveOneFileTo(
190 \
ILIAS\FileUpload\Location::WEB,
191 $this->getFileName(),
217 if ($fileData[
'tmp_name']) {
218 $this->
save($fileData[
'tmp_name']);
227 return self::$SUPPORTED_FILE_EXTENSIONS;
__construct(int $providerId, string $filename='')
ilLTIConsumeProviderIcon constructor.
Class ChatMainBarProvider .
static $SUPPORTED_FILE_EXTENSIONS
handleUploadInputSubission(ilImageFileInputGUI $fileInput)
static $RELATIVE_DIRECTORY_PATH
static execConvert($args)
execute convert command
static getSupportedFileExtensions()
buildFilename($fileExtension)
setFilename(string $filename)
static getWebspaceDir($mode="filesystem")
get webspace directory
ensureExistingRelativeDirectory()