19 declare(strict_types=1);
66 $this->data_factory = $data_factory;
89 $clone->max_file_size_in_bytes = $clone->upload_limit_resolver->getBestPossibleUploadLimitInBytes(
90 $clone->upload_handler,
104 $clone = clone $this;
117 $clone = clone $this;
118 $clone->accepted_mime_types = $mime_types;
144 $clone = clone $this;
145 $identifier_key = $clone->upload_handler->getFileIdentifierParameterName();
147 $file_id = ($clone->hasMetadataInputs()) ? $data[$identifier_key] : $data;
151 $clone->dynamic_inputs[$file_id] = $clone->dynamic_input_template->withValue($data);
172 'invalid_mime' => $this->
language->txt(
'ui_file_input_invalid_mime'),
173 'invalid_size' => $this->
language->txt(
'ui_file_input_invalid_size'),
174 'invalid_amount' => $this->
language->txt(
'ui_file_input_invalid_amount'),
175 'general_error' => $this->
language->txt(
'ui_file_input_general_error'),
181 return static function () {
187 if ($this->requirement_constraint !==
null) {
191 return $this->
refinery->custom()->constraint(
196 return $txt(
"msg_no_files_selected");
217 if (!array_key_exists($this->upload_handler->getFileIdentifierParameterName(),
$data)) {
223 if (!$this->dynamic_input_template->isClientSideValueOk($data)) {
234 $default_metadata_input =
new Hidden(
239 if (
null === $metadata_input) {
240 return $default_metadata_input;
244 $metadata_input->getInputs() : [
249 $inputs[$this->upload_handler->getFileIdentifierParameterName()] = $default_metadata_input;
252 $this->has_metadata_inputs =
true;
A constraint encodes some resrtictions on values.
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
__construct(Container $dic, ilPlugin $plugin)
language()
description: > Example for rendring a language glyph.