ILIAS  trunk Revision v11.0_alpha-2638-g80c1d007f79
with_metadata.php
Go to the documentation of this file.
1 <?php
2 
18 declare(strict_types=1);
19 
21 
23 
42 function with_metadata(): string
43 {
44  global $DIC;
45 
46  $factory = $DIC->ui()->factory();
47  $renderer = $DIC->ui()->renderer();
48 
49  $input = $factory->input()->field()->image(
51  ImagePurpose::USER_DEFINED,
52  'Upload Image',
53  'Please provide an alternate text if necessary.',
54  $factory->input()->field()->text('Additional information')
55  );
56 
57  $form = $factory->input()->container()->form()->standard("#", [$input]);
58 
59  return $renderer->render($form);
60 }
$renderer
ImagePurpose
This enum provides options to categorise the purpose of an image, which will be used to determine whe...
Class ilUIDemoFileUploadHandlerGUI.
global $DIC
Definition: shib_login.php:26
with_metadata()
description: > The example shows how to create and render a Image Field with an additional metadata ...