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