ILIAS
trunk Revision v12.0_alpha-377-g3641b37b9db
◀ ilDoc Overview
with_mustache_variables.php
Go to the documentation of this file.
1
<?php
2
19
declare(strict_types=1);
20
21
namespace
ILIAS\UI\examples\Input\Field\Markdown
;
22
35
function
with_mustache_variables
(): string
36
{
37
global
$DIC
;
38
39
$factory =
$DIC
->ui()->factory();
40
$renderer
=
$DIC
->ui()->renderer();
41
42
$input = $factory->input()->field()->markdown(
43
new
\
ilUIMarkdownPreviewGUI
(),
44
"Create template"
,
45
"You can use Mustache variables here, how fun :)."
,
46
);
47
48
$input = $input->withMustacheVariables(
49
[
50
'var1'
=>
'Test Variable 1'
,
51
'var2'
=>
'Test Variable 2'
,
52
'var3'
=>
'Test Variable 3'
,
53
],
54
'Also, some more info could be added here as well.'
55
);
56
57
$form = $factory->input()->container()->form()->standard(
'#'
, [$input]);
58
59
return
$renderer
->render($form);
60
}
$renderer
$renderer
Definition:
build_bootstrap.php:83
ilUIMarkdownPreviewGUI
Definition:
class.ilUIMarkdownPreviewGUI.php:32
ILIAS\UI\examples\Input\Field\Markdown
Definition:
base.php:21
ILIAS\UI\examples\Input\Field\Markdown\with_mustache_variables
with_mustache_variables()
Definition:
with_mustache_variables.php:35
$DIC
global $DIC
Definition:
shib_login.php:26
components
ILIAS
UI
src
examples
Input
Field
Markdown
with_mustache_variables.php
Generated on Sat Dec 13 2025 23:03:57 for ILIAS by
1.9.4 (using
Doxyfile
)