ILIAS  trunk Revision v11.0_alpha-1731-gff9cd7e2bd3
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
with_clear_button.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
22 
35 {
36  global $DIC;
37 
38  $factory = $DIC->ui()->factory();
39  $renderer = $DIC->ui()->renderer();
40  $request = $DIC->http()->request();
41 
42  $submit_flag = 'dropzone_wrapper_with_clear_button';
43  $post_url = "{$request->getUri()}&$submit_flag";
44 
45  $dropzone = $factory
46  ->dropzone()->file()->wrapper(
47  'Upload your files here',
48  $post_url,
49  $factory->messageBox()->info('Drag and drop files onto me!'),
50  $factory->input()->field()->file(
52  'Your files'
53  )
54  );
55 
56  $dropzone = $dropzone->withActionButtons([
57  $factory->button()->standard('Clear files!', '#')->withOnClick($dropzone->getClearSignal())
58  ]);
59 
60  return $renderer->render($dropzone);
61 }
$renderer
with_clear_button()
description: > Example for rendering a file dropzone wrapper with clear buttons. ...
global $DIC
Definition: shib_login.php:22
ilUIAsyncDemoFileUploadHandlerGUI: ilUIPluginRouterGUI