19declare(strict_types=1);
31 protected \ILIAS\FileUpload\FileUpload
$upload;
42 $this->
upload = $DIC->upload();
56 return $this->repo->getIdStringForAssId($this->ass_id);
61 $this->repo->createCollection($this->ass_id);
66 $this->repo->importFromLegacyUpload(
75 $this->repo->importFromDirectory(
84 $this->repo->deleteCollection(
92 return $this->repo->getCollection($this->ass_id);
97 if ($this->repo->hasCollection($this->ass_id)) {
100 'rid' =>
$info->getRid(),
101 'name' =>
$info->getTitle(),
102 'size' =>
$info->getSize(),
103 'ctime' =>
$info->getCreationTimestamp(),
104 'fullpath' =>
$info->getSrc(),
105 'mime' =>
$info->getMimeType(),
108 }, iterator_to_array($this->repo->getCollectionResourcesInfo($this->ass_id)));
113 public function deliver(
string $full_path,
string $file): void
115 if ($this->repo->hasCollection($this->ass_id)) {
116 $this->repo->deliverFile($this->ass_id, $file);
129 $this->repo->clone($this->ass_id, $to_ass_id);
ILIAS FileUpload FileUpload $upload
InstructionFileRepository $repo
__construct(int $ass_id, InstructionFileRepository $repo, \ilExcInstructionFilesStakeholder $stakeholder)
importFromLegacyUpload(array $file_input)
ilExcInstructionFilesStakeholder $stakeholder
importFromDirectory(string $dir)
deliver(string $full_path, string $file)
Class ResourceCollection.
return['delivery_method'=> 'php',]
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
The base interface for all filesystem streams.
Interface ResourceStakeholder.