ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
dropzone_in_dropzone.php
Go to the documentation of this file.
1<?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}
An exception for terminatinating execution or to throw for unit testing.
dropzone_in_dropzone()
Class BaseForm.
global $DIC
Definition: saml.php:7
if((!isset($_SERVER['DOCUMENT_ROOT'])) OR(empty($_SERVER['DOCUMENT_ROOT']))) $_SERVER['DOCUMENT_ROOT']