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\Textarea
;
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()->textarea(
43
"Create template"
,
44
"You can use Mustache variables here, how fun :)."
,
45
);
46
47
$input = $input->withMustacheVariables(
48
[
49
'var1'
=>
'Test Variable 1'
,
50
'var2'
=>
'Test Variable 2'
,
51
'var3'
=>
'Test Variable 3'
,
52
],
53
'Also, some more info could be added here as well.'
54
);
55
56
$form = $factory->input()->container()->form()->standard(
'#'
, [$input]);
57
58
return
$renderer
->render($form);
59
}
$renderer
$renderer
Definition:
build_bootstrap.php:83
ILIAS\UI\examples\Input\Field\Textarea
Definition:
base.php:21
ILIAS\UI\examples\Input\Field\Textarea\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
Textarea
with_mustache_variables.php
Generated on Sat Dec 13 2025 23:03:57 for ILIAS by
1.9.4 (using
Doxyfile
)