ILIAS  trunk Revision v11.0_alpha-2638-g80c1d007f79
user_defined.php
Go to the documentation of this file.
1 <?php
2 
18 declare(strict_types=1);
19 
21 
23 
42 function user_defined(): 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  );
55 
56  $form = $factory->input()->container()->form()->standard("#", [$input]);
57 
58  return $renderer->render($form);
59 }
$renderer
ImagePurpose
This enum provides options to categorise the purpose of an image, which will be used to determine whe...
user_defined()
description: > The example shows how to create and render a Image Field for images where the purpose...
Class ilUIDemoFileUploadHandlerGUI.
global $DIC
Definition: shib_login.php:26