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_standard_base';
17  $post_url = "{$request->getUri()}&$submit_flag";
18 
19  $dropzone = $factory
20  ->dropzone()->file()->standard(
21  'Upload your files here',
22  'Drag files in here to upload them!',
23  $post_url,
24  $factory->input()->field()->file(
26  'your files'
27  )
28  )->withUploadButton(
29  $factory->button()->shy('Upload files', '#')
30  );
31 
32  // please use ilCtrl to generate an appropriate link target
33  // and check it's command instead of this.
34  if ($wrapper->has($submit_flag)) {
35  $dropzone = $dropzone->withRequest($request);
36  $data = $dropzone->getData();
37  } else {
38  $data = 'no results yet.';
39  }
40 
41  return '<pre>' . print_r($data, true) . '</pre>' .
42  $renderer->render($dropzone);
43 }
global $DIC
Definition: feed.php:28
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...