ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
bulky.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
6 
7 function bulky()
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_bulky';
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  )
29  ->withBulky(true)
30  ->withUploadButton(
31  $factory->button()->shy('Upload files', '#')
32  );
33 
34  // please use ilCtrl to generate an appropriate link target
35  // and check it's command instead of this.
36  if ($wrapper->has($submit_flag)) {
37  $dropzone = $dropzone->withRequest($request);
38  $data = $dropzone->getData();
39  } else {
40  $data = 'no results yet.';
41  }
42 
43  return '<pre>' . print_r($data, true) . '</pre>' .
44  $renderer->render($dropzone);
45 }
global $DIC
Definition: feed.php:28
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...