19 declare(strict_types=1);
46 public function __construct(
int $target_ref_id,
string $content = null)
50 $this->definition = $DIC[
'objDefinition'];
52 $this->
language->loadLanguageModule(
'file');
53 $this->
access = $DIC->access();
54 $this->
ctrl = $DIC->ctrl();
55 $this->
ui = $DIC->ui();
57 $this->lom_services = $DIC->learningObjectMetadata();
67 if ($active === null) {
68 $active = $this->lom_services->copyrightHelper()->isCopyrightSelectionActive();
75 $this->
ctrl->setParameterByClass(
80 $this->
ctrl->setParameterByClass(
85 $this->
ctrl->setParameterByClass(
92 $post_url = $this->
ctrl->getFormActionByClass(
93 [ilRepositoryGUI::class, ilObjFileGUI::class],
97 $this->
ctrl->clearParameterByClass(ilObjFileGUI::class,
'new_type');
100 $additional_input = null;
102 $additional_input = $this->getCopyrightSelectionInput(
'set_license_for_all_files');
106 $dropzone = $this->
ui->factory()->dropzone()->file()->wrapper(
107 $this->
language->txt(
'upload_files'),
109 $this->
ui->factory()->legacy($this->content ??
''),
110 $this->
ui->factory()->input()->field()->file(
111 $this->upload_handler,
112 $this->
language->txt(
'upload_files'),
114 $this->
ui->factory()->input()->field()->group([
118 $this->getEmptyStringToNullTransformation()
123 $this->getEmptyStringToNullTransformation()
133 $this->
language->txt(
'upload_files')
141 if ($this->definition->isContainer($obj_type) && $obj_type !==
"orgu") {
142 return $this->
access->checkAccess(
'create_file',
'', $this->target_ref_id,
'file');
150 return $this->
ui->renderer()->render($this->getDropzone());
155 return $this->
ui->factory();
Interface Observer Contains several chained tasks and infos about them.
UploadHandler $upload_handler
ILIAS Refinery Factory $refinery
Provides fluid interface to RBAC services.
__construct(int $target_ref_id, string $content=null)
isUploadAllowed(string $obj_type)
language()
description: > Example for rendring a language glyph.
const UPLOAD_ORIGIN_DROPZONE
const PARAM_UPLOAD_ORIGIN
isCopyrightSelectionActive()
LOMServices $lom_services
ilObjectDefinition $definition