ILIAS  release_8 Revision v8.24
base.php
Go to the documentation of this file.
1<?php
2
3declare(strict_types=1);
4
6
7function base()
8{
9 global $DIC;
10
11 $factory = $DIC->ui()->factory();
12 $renderer = $DIC->ui()->renderer();
13 $request = $DIC->http()->request();
14
15 $dropzone = $factory
16 ->dropzone()->file()->standard(
17 'Upload your files here',
18 'Drag files in here to upload them!',
19 '#',
20 $factory->input()->field()->file(
22 'your files'
23 )
24 )->withUploadButton(
25 $factory->button()->shy('Upload files', '#')
26 );
27
28 // please use ilCtrl to generate an appropriate link target
29 // and check it's command instead of this.
30 if ('POST' === $request->getMethod()) {
31 $dropzone = $dropzone->withRequest($request);
32 $data = $dropzone->getData();
33 } else {
34 $data = 'no results yet.';
35 }
36
37 return '<pre>' . print_r($data, true) . '</pre>' .
38 $renderer->render($dropzone);
39}
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
global $DIC
Definition: feed.php:28
$factory
Definition: metadata.php:75