ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
base.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
6 
7 function base()
8 {
9  global $DIC;
10 
11  $factory = $DIC->ui()->factory();
12  $renderer = $DIC->ui()->renderer();
13  $request = $DIC->http()->request();
14  $wrapper = $DIC->http()->wrapper()->query();
15 
16  $submit_flag = 'dropzone_wrapper_base';
17  $post_url = "{$request->getUri()}&$submit_flag";
18 
19  $dropzone = $factory
20  ->dropzone()->file()->wrapper(
21  'Upload your files here',
22  $post_url,
23  $factory->messageBox()->info('Drag and drop files onto me!'),
24  $factory->input()->field()->file(
26  'Your files'
27  )
28  );
29 
30  // please use ilCtrl to generate an appropriate link target
31  // and check it's command instead of this.
32  if ($wrapper->has($submit_flag)) {
33  $dropzone = $dropzone->withRequest($request);
34  $data = $dropzone->getData();
35  } else {
36  $data = 'no results yet.';
37  }
38 
39  return '<pre>' . print_r($data, true) . '</pre>' .
40  $renderer->render($dropzone);
41 }
global $DIC
Definition: feed.php:28
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...