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()->wrapper(
17 'Upload your files here',
18 '#',
19 $factory->messageBox()->info('Drag and drop files onto me!'),
20 $factory->input()->field()->file(
22 'Your files'
23 )
24 );
25
26 // please use ilCtrl to generate an appropriate link target
27 // and check it's command instead of this.
28 if ('POST' === $request->getMethod()) {
29 $dropzone = $dropzone->withRequest($request);
30 $data = $dropzone->getData();
31 } else {
32 $data = 'no results yet.';
33 }
34
35 return '<pre>' . print_r($data, true) . '</pre>' .
36 $renderer->render($dropzone);
37}
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