ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
Standard.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
22 
26 use ILIAS\UI\Component\Dropzone\File\Standard as StandardDropzone;
30 
34 class Standard extends File implements StandardDropzone
35 {
36  protected ?Button $upload_button = null;
37  protected string $message;
38 
39  public function __construct(
41  FieldFactory $field_factory,
42  NameSource $name_source,
43  string $title,
44  string $message,
45  string $post_url,
46  FileInput $file_input,
47  ?FormInput $additional_input
48  ) {
50  $signal_generator,
51  $field_factory,
52  $name_source,
53  $title,
54  $post_url,
55  $file_input,
56  $additional_input,
57  );
58  $this->message = $message;
59  }
60 
61  public function getMessage(): string
62  {
63  return $this->message;
64  }
65 
66  public function withUploadButton(Button $button): self
67  {
68  $clone = clone $this;
69  $clone->upload_button = $button;
70  return $clone;
71  }
72 
73  public function getUploadButton(): ?Button
74  {
75  return $this->upload_button;
76  }
77 }
This is what a factory for input fields looks like.
Definition: Factory.php:28
withUploadButton(Button $button)
Get a dropzone like this, using the given button to upload the files to the server.
Definition: Standard.php:66
getUploadButton()
Get the button to upload the files to the server.
Definition: Standard.php:73
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition: Bulky.php:21
getMessage()
Get the message of this dropzone.
Definition: Standard.php:61
__construct(SignalGeneratorInterface $signal_generator, FieldFactory $field_factory, NameSource $name_source, string $title, string $message, string $post_url, FileInput $file_input, ?FormInput $additional_input)
Definition: Standard.php:39
SignalGeneratorInterface $signal_generator
Definition: File.php:46
__construct(Container $dic, ilPlugin $plugin)
A standard file dropzone offers the possibility to upload dropped files to the server.
Definition: Standard.php:28
This describes inputs that can be used in forms.
Definition: FormInput.php:31
Describes a source for input names.
Definition: NameSource.php:26