3declare(strict_types=1);
32 $settings->getObjId(),
35 move_uploaded_file($file_info[
'tmp_name'], $target);
37 if ($which === self::IMG_ABSTRACT) {
40 if ($which === self::IMG_EXTRO) {
49 if ($which === self::IMG_ABSTRACT) {
53 if ($which === self::IMG_EXTRO) {
58 $this->deleteFile($delete);
64 return $this->getStoragePath()
72 public function getSuffix(
string $file_name) : string
74 return pathinfo($file_name, PATHINFO_EXTENSION);
82 return $this->getAbsolutePath() .
'/';
90 return self::PATH_PRE;
98 return self::PATH_POST;
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)
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc