ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
with_metadata.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
38function with_metadata(): string
39{
40 global $DIC;
41 $factory = $DIC->ui()->factory();
42 $renderer = $DIC->ui()->renderer();
43
44 $file_input = $factory->input()->field()->file(
46 "Upload File",
47 "After choosing the file you can add additional metadata.",
48 $factory->input()->field()->switchableGroup([
49 $factory->input()->field()->group([$factory->input()->field()->text('New filename')], 'Yes'),
50 $factory->input()->field()->group([], 'No'),
51 ], 'Change filename?'),
52 );
53
54 $form = $factory->input()->container()->form()->standard("#", [$file_input]);
55
56 return $renderer->render($form);
57}
$renderer
Class ilUIDemoFileUploadHandlerGUI.
global $DIC
Definition: shib_login.php:26