ILIAS  trunk Revision v11.0_alpha-2638-g80c1d007f79
informative.php
Go to the documentation of this file.
1 <?php
2 
18 declare(strict_types=1);
19 
21 
23 
41 function informative(): string
42 {
43  global $DIC;
44 
45  $factory = $DIC->ui()->factory();
46  $renderer = $DIC->ui()->renderer();
47 
48  $input = $factory->input()->field()->image(
50  ImagePurpose::INFORMATIVE,
51  'Upload Image',
52  'This image should convey important information.',
53  );
54 
55  $form = $factory->input()->container()->form()->standard("#", [$input]);
56 
57  return $renderer->render($form);
58 }
$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
informative()
description: > The example shows how to create and render a Image Field for informative images and a...
Definition: informative.php:41