ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
with_clear_button.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
6 
7 function with_clear_button()
8 {
9  global $DIC;
10 
11  $factory = $DIC->ui()->factory();
12  $renderer = $DIC->ui()->renderer();
13 
14  $dropzone = $factory
15  ->dropzone()->file()->wrapper(
16  'Upload your files here',
17  '#',
18  $factory->messageBox()->info('Drag and drop files onto me!'),
19  $factory->input()->field()->file(
21  'Your files'
22  )
23  );
24 
25  $dropzone = $dropzone->withActionButtons([
26  $factory->button()->standard('Clear files!', '#')->withOnClick($dropzone->getClearSignal())
27  ]);
28 
29  return $renderer->render($dropzone);
30 }
global $DIC
Definition: feed.php:28
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
$factory
Definition: metadata.php:75