ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
bulky.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
29function 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
@ilCtrl_isCalledBy ilUIAsyncDemoFileUploadHandlerGUI: ilUIPluginRouterGUI
global $DIC
Definition: shib_login.php:26