ILIAS  trunk Revision v11.0_alpha-1744-gb0451eebef4
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator 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  protected bool $bulky = false;
39 
40  public function __construct(
42  FieldFactory $field_factory,
43  NameSource $name_source,
44  string $title,
45  string $message,
46  string $post_url,
47  FileInput $file_input,
48  ?FormInput $additional_input
49  ) {
51  $signal_generator,
52  $field_factory,
53  $name_source,
54  $title,
55  $post_url,
56  $file_input,
57  $additional_input,
58  );
59  $this->message = $message;
60  }
61 
62  public function getMessage(): string
63  {
64  return $this->message;
65  }
66 
67  public function withUploadButton(Button $button): self
68  {
69  $clone = clone $this;
70  $clone->upload_button = $button;
71  return $clone;
72  }
73 
74  public function getUploadButton(): ?Button
75  {
76  return $this->upload_button;
77  }
78 
79  public function withBulky(bool $bulky): StandardDropzone
80  {
81  $clone = clone $this;
82  $clone->bulky = $bulky;
83  return $clone;
84  }
85 
86  public function isBulky(): bool
87  {
88  return $this->bulky;
89  }
90 }
withUploadButton(Button $button)
Get a dropzone like this, using the given button to upload the files to the server.
Definition: Standard.php:67
getUploadButton()
Get the button to upload the files to the server.
Definition: Standard.php:74
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
getMessage()
Get the message of this dropzone.
Definition: Standard.php:62
withBulky(bool $bulky)
Makes a dropzone bulky, this to ensure better visibility when the dropzone is to be displayed standal...
Definition: Standard.php:79
__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:40
SignalGeneratorInterface $signal_generator
Definition: File.php:48
__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:32
Describes a source for input names.
Definition: NameSource.php:26