ILIAS
release_9 Revision v9.13-25-g2c18ec4c24f
◀ ilDoc Overview
UploadBuilder.php
Go to the documentation of this file.
1
<?php
2
19
declare(strict_types=1);
20
21
namespace
ILIAS\Services\ResourceStorage\Collections\View
;
22
23
use
ILIAS\UI\Factory
;
24
use
ILIAS\UI\Component\Dropzone\File\File
;
25
use
ILIAS\UI\Component\Input\Field\UploadHandler
;
26
30
final
class
UploadBuilder
31
{
32
public
function
__construct
(
33
private
Request
$request,
34
private
\
ilCtrlInterface
$ctrl,
35
private
Factory
$ui_factory,
36
private
\
ilLanguage
$language,
37
private
UploadHandler
$upload_handler
38
) {
39
}
40
41
public
function
getDropZone
(): \
Generator
42
{
43
if
($this->request->canUserUplaod()) {
44
yield $this->ui_factory->dropzone()->file()->standard(
45
$this->
language
->txt(
'upload_modal_title'
),
46
$this->
language
->txt(
'msg_upload'
),
47
$this->
ctrl
->getLinkTargetByClass(
48
\ilResourceCollectionGUI::class,
49
\
ilResourceCollectionGUI::CMD_POST_UPLOAD
50
),
51
$this->ui_factory->input()->field()->file(
52
$this->upload_handler,
53
$this->
language
->txt(
'upload_field_title'
)
54
)->withMaxFiles(100)
55
)->withUploadButton(
56
$this->ui_factory->button()->shy(
57
$this->
language
->txt(
'select_files_from_computer'
),
58
'#'
59
)
60
)->withBulky(
true
);
61
}
62
}
63
}
ilResourceCollectionGUI\CMD_POST_UPLOAD
const CMD_POST_UPLOAD
Definition:
class.ilResourceCollectionGUI.php:51
ilLanguage
Factory
UploadHandler
ILIAS\Services\ResourceStorage\Collections\View\UploadBuilder
Definition:
UploadBuilder.php:30
ServerRequestInterface
ILIAS\Repository\ctrl
ctrl()
Definition:
trait.GlobalDICGUIServices.php:63
Factory
ILIAS\Services\ResourceStorage\Collections\View\UploadBuilder\__construct
__construct(private Request $request, private \ilCtrlInterface $ctrl, private Factory $ui_factory, private \ilLanguage $language, private UploadHandler $upload_handler)
Definition:
UploadBuilder.php:32
ILIAS\UI\Component\Input\Field\UploadHandler
Interface UploadHandler.
Definition:
UploadHandler.php:31
File
ILIAS\Services\ResourceStorage\Collections\View\UploadBuilder\getDropZone
getDropZone()
Definition:
UploadBuilder.php:41
Generator
ILIAS\Services\ResourceStorage\Collections\View
Definition:
ActionBuilder.php:21
ILIAS\UI\examples\Symbol\Glyph\Language\language
language()
Definition:
language.php:7
ilCtrlInterface
Services
ResourceStorage
classes
Collections
View
UploadBuilder.php
Generated on Wed Sep 10 2025 14:11:52 for ILIAS by
1.8.13 (using
Doxyfile
)