ILIAS
trunk Revision v12.0_alpha-377-g3641b37b9db
◀ ilDoc Overview
base.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
23
use
ilUIMarkdownPreviewGUI
;
24
34
function
base
()
35
{
36
global
$DIC
;
37
38
// retrieve dependencies
39
$md_renderer =
new
ilUIMarkdownPreviewGUI
();
40
$query_wrapper =
$DIC
->http()->wrapper()->query();
41
$inputs
=
$DIC
->ui()->factory()->input();
42
$renderer
=
$DIC
->ui()->renderer();
43
$request =
$DIC
->http()->request();
44
45
// declare form and input
46
$markdown_input =
$inputs
->field()->markdown($md_renderer,
'Markdown Input'
,
'Just a markdown input.'
);
47
$form =
$inputs
->container()->form()->standard(
'#'
, [$markdown_input]);
48
49
// please use ilCtrl to generate an appropriate link target
50
// and check it's command instead of this.
51
if
(
'POST'
=== $request->getMethod()) {
52
$form = $form->withRequest($request);
53
$data
= $form->getData();
54
}
else
{
55
$data
=
'no results yet.'
;
56
}
57
58
return
59
'<pre>'
. print_r(
$data
,
true
) .
'</pre>'
.
60
$renderer
->render($form);
61
}
$renderer
$renderer
Definition:
build_bootstrap.php:83
ilUIMarkdownPreviewGUI
Definition:
class.ilUIMarkdownPreviewGUI.php:32
$data
$data
Definition:
ltiregistration.php:29
ILIAS\UI\Implementation\Component\Input\$inputs
array $inputs
Definition:
Group.php:42
ILIAS\UI\examples\Input\Field\Markdown
Definition:
base.php:21
ILIAS\UI\examples\Input\Field\Markdown\base
base()
Definition:
base.php:34
ILIAS\UI\examples\Layout\Page\Mail\$DIC
global $DIC
Definition:
base.php:55
components
ILIAS
UI
src
examples
Input
Field
Markdown
base.php
Generated on Sat Dec 13 2025 23:03:56 for ILIAS by
1.9.4 (using
Doxyfile
)