3declare(strict_types=1);
17 parent::__construct(self::STORAGE_WEB,
false, 0);
30 $settings->getObjId(),
33 move_uploaded_file($file_info[
'tmp_name'],
$target);
35 if ($which === self::IMG_ABSTRACT) {
38 if ($which === self::IMG_EXTRO) {
47 if ($which === self::IMG_ABSTRACT) {
51 if ($which === self::IMG_EXTRO) {
56 $this->deleteFile($delete);
62 return $this->getStoragePath()
70 public function getSuffix(
string $file_name) : string
72 return pathinfo($file_name, PATHINFO_EXTENSION);
80 return $this->getAbsolutePath() .
'/';
An exception for terminatinating execution or to throw for unit testing.
create()
Create directory.
getAbsolutePath()
Get absolute path of storage directory.
Storage of images in settings.
getSuffix(string $file_name)
getPathPostfix()
Get directory name.E.g for files => file Only relative path, no trailing slash '_<obj_id>' will be ap...
delete_image(string $which, ilLearningSequenceSettings $settings)
getPathPrefix()
Get path prefix.Prefix that will be prepended to the path No trailing slash. E.g ilFiles for files@ab...
getStoragePathFor(string $which, int $obj_id, string $suffix)
moveUploaded(string $which, array $file_info, ilLearningSequenceSettings $settings)
Settings for an LSO (like abstract, extro)
withExtroImage(string $path=null)
withAbstractImage(string $path=null)