ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
Standard.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
26use ILIAS\UI\Component\Dropzone\File\Standard as StandardDropzone;
30
34class 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 ) {
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 {
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}
SignalGeneratorInterface $signal_generator
Definition: File.php:48
withUploadButton(Button $button)
Get a dropzone like this, using the given button to upload the files to the server.
Definition: Standard.php:67
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
getUploadButton()
Get the button to upload the files to the server.
Definition: Standard.php:74
This describes commonalities between standard and primary buttons.
Definition: Button.php:34
A standard file dropzone offers the possibility to upload dropped files to the server.
Definition: Standard.php:29
This describes inputs that can be used in forms.
Definition: FormInput.php:33
This is what a factory for input fields looks like.
Definition: Factory.php:31
This describes file field.
Definition: File.php:29
Describes a source for input names.
Definition: NameSource.php:27
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition: Bulky.php:21