45        $this->web = 
$service->filesystem()->web();
 
   61    public function copy(
int $target_obj_id)
 
   72                    '/(' . 
"tile_image_" . 
')(\d*)\/(.*)$/',
 
   73                    '${1}' . $target_obj_id . 
'/${3}',
 
   79        } 
catch (\Exception $e) {
 
   87    public function delete()
 
   89        if ($this->web->hasDir($this->getRelativeDirectory())) {
 
   92            } 
catch (\Exception $e) {
 
  108        if ($this->web->has($file_name)) {
 
  109            $this->web->delete($file_name);
 
  112        if ($this->upload->hasUploads()) {
 
  113            if (!$this->upload->hasBeenProcessed()) {
 
  114                $this->upload->process();
 
  118            $results = $this->upload->getResults();
 
  121                $this->ext = pathinfo(
$result->getName(), PATHINFO_EXTENSION);
 
  123                if (
$result->getStatus() == \
ILIAS\FileUpload\DTO\ProcessingStatus::OK) {
 
  124                    $this->upload->moveOneFileTo(
 
  127                        \
ILIAS\FileUpload\Location::WEB,
 
  134                    list($width, $height, 
$type, $attr) = getimagesize($fullpath);
 
  135                    $min = min($width, $height);
 
  136                    ilUtil::execConvert($fullpath . 
"[0] -geometry " . $min . 
"x" . $min . 
"^ -gravity center -extent " . $min . 
"x" . $min . 
" " . $fullpath);
 
  182        return implode(DIRECTORY_SEPARATOR, [
 
  185            "tile_image_" . $this->obj_id
 
  202        return implode(DIRECTORY_SEPARATOR, [
 
  225        return implode(DIRECTORY_SEPARATOR, [
 
  240        $target_dir = implode(DIRECTORY_SEPARATOR, [
 
An exception for terminatinating execution or to throw for unit testing.
static _lookupContainerSetting($a_id, $a_keyword, $a_default_value=null)
Lookup a container setting.
static _deleteContainerSettings($a_id, $a_keyword=null, $a_keyword_like=false)
static _writeContainerSetting($a_id, $a_keyword, $a_value)
exists()
Does tile image file exist?bool
createFromImportDir($source_dir, $ext)
getFullPath()
Get full path of the tile image file.string
__construct(ilObjectService $service, int $obj_id)
Constructor.
copy(int $target_obj_id)
Copy tile image to repository object.
persistImageState($filename)
getExtension()
Get extenstion.string
static getWebspaceDir($mode="filesystem")
get webspace directory
static execConvert($args)
execute convert command
static rCopy($a_sdir, $a_tdir, $preserveTimeAttributes=false)
Copies content of a directory $a_sdir recursively to a directory $a_tdir.
saveFromHttpRequest(string $tmpname)
Save image from request.