ILIAS  trunk Revision v11.0_alpha-1749-g1a06bdef097
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
bulky.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
22 
29 function bulky()
30 {
31  global $DIC;
32 
33  $factory = $DIC->ui()->factory();
34  $renderer = $DIC->ui()->renderer();
35  $request = $DIC->http()->request();
36  $wrapper = $DIC->http()->wrapper()->query();
37 
38  $submit_flag = 'dropzone_standard_bulky';
39  $post_url = "{$request->getUri()}&$submit_flag";
40 
41  $dropzone = $factory
42  ->dropzone()->file()->standard(
43  'Upload your files here',
44  'Drag files in here to upload them!',
45  $post_url,
46  $factory->input()->field()->file(
48  'your files'
49  )
50  )
51  ->withBulky(true)
52  ->withUploadButton(
53  $factory->button()->shy('Upload files', '#')
54  );
55 
56  // please use ilCtrl to generate an appropriate link target
57  // and check it's command instead of this.
58  if ($wrapper->has($submit_flag)) {
59  $dropzone = $dropzone->withRequest($request);
60  $data = $dropzone->getData();
61  } else {
62  $data = 'no results yet.';
63  }
64 
65  return '<pre>' . print_r($data, true) . '</pre>' .
66  $renderer->render($dropzone);
67 }
$renderer
global $DIC
Definition: shib_login.php:22
ilUIAsyncDemoFileUploadHandlerGUI: ilUIPluginRouterGUI
bulky()
expected output: > ILIAS shows a base file upload field with a larger height.
Definition: bulky.php:29