ILIAS  release_10 Revision v10.1-43-ga1241a92c2f
bulky.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
6 
13 function bulky()
14 {
15  global $DIC;
16 
17  $factory = $DIC->ui()->factory();
18  $renderer = $DIC->ui()->renderer();
19  $request = $DIC->http()->request();
20  $wrapper = $DIC->http()->wrapper()->query();
21 
22  $submit_flag = 'dropzone_standard_bulky';
23  $post_url = "{$request->getUri()}&$submit_flag";
24 
25  $dropzone = $factory
26  ->dropzone()->file()->standard(
27  'Upload your files here',
28  'Drag files in here to upload them!',
29  $post_url,
30  $factory->input()->field()->file(
32  'your files'
33  )
34  )
35  ->withBulky(true)
36  ->withUploadButton(
37  $factory->button()->shy('Upload files', '#')
38  );
39 
40  // please use ilCtrl to generate an appropriate link target
41  // and check it's command instead of this.
42  if ($wrapper->has($submit_flag)) {
43  $dropzone = $dropzone->withRequest($request);
44  $data = $dropzone->getData();
45  } else {
46  $data = 'no results yet.';
47  }
48 
49  return '<pre>' . print_r($data, true) . '</pre>' .
50  $renderer->render($dropzone);
51 }
$renderer
global $DIC
Definition: shib_login.php:25
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
bulky()
expected output: > ILIAS shows a base file upload field with a larger height.
Definition: bulky.php:13