ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
UploadBuilder.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
25
29final class UploadBuilder
30{
31 public function __construct(
32 private Request $request,
33 private \ilCtrlInterface $ctrl,
34 private Factory $ui_factory,
35 private \ilLanguage $language,
36 private UploadHandler $upload_handler
37 ) {
38 }
39
40 public function getDropZone(): \Generator
41 {
42 if ($this->request->canUserUplaod()) {
43 yield $this->ui_factory->dropzone()->file()->standard(
44 $this->language->txt('upload_modal_title'),
45 $this->language->txt('msg_upload'),
46 $this->ctrl->getLinkTargetByClass(
47 \ilResourceCollectionGUI::class,
49 ),
50 $this->ui_factory->input()->field()->file(
51 $this->upload_handler,
52 $this->language->txt('upload_field_title')
53 )->withMaxFiles(100)
54 )->withUploadButton(
55 $this->ui_factory->button()->shy(
56 $this->language->txt('select_files_from_computer'),
57 '#'
58 )
59 )->withBulky(true);
60 }
61 }
62}
Builds a Color from either hex- or rgb values.
Definition: Factory.php:31
__construct(private Request $request, private \ilCtrlInterface $ctrl, private Factory $ui_factory, private \ilLanguage $language, private UploadHandler $upload_handler)
language handling
This is how the factory for UI elements looks.
Definition: Factory.php:38
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...