ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
dropzone_in_dropzone.php File Reference

Go to the source code of this file.

Functions

 dropzone_in_dropzone ()
 

Function Documentation

◆ dropzone_in_dropzone()

dropzone_in_dropzone ( )

Definition at line 2 of file dropzone_in_dropzone.php.

3{
4 global $DIC;
5
6 // This example shows how the wrapper-dropzone will be "unusable" when another Dropzone is in it.
7 // Dropping a file on the outer wrapper dropzone won't open a modal.
8 // The innermost dropzone will be the working one. This example does not proceed the file, it's
9 // only purpose is tho show stacking dropzones.
10
11 $uiFactory = $DIC->ui()->factory();
12 $renderer = $DIC->ui()->renderer();
13
14 $uploadUrl = $_SERVER['REQUEST_URI'] . '&example=2';
15
16 $content = $uiFactory->dropzone()->file()->standard($uploadUrl);
17 $panel = $uiFactory->panel()->standard("Panel Titel", $content);
18
19 $upload = $uiFactory->dropzone()->file()->wrapper($uploadUrl, $panel)
20 ->withMaxFiles(2)
21 ->withFileSizeLimit(new \ILIAS\Data\DataSize(300 * 1000, \ILIAS\Data\DataSize::KB));
22
23 return $renderer->render($upload);
24}
Class ChatMainBarProvider \MainMenu\Provider.
$_SERVER['HTTP_HOST']
Definition: raiseError.php:10
$DIC
Definition: xapitoken.php:46

References $_SERVER, and $DIC.