3declare(strict_types=1);
20 $ilTree =
$DIC[
'tree'];
26 $ilTree->getNodeData(1)
30 $data = $ilTree->getChilds($ref);
31 if (count(
$data) === 0) {
36 $recursion =
new class () implements \
ILIAS\
UI\
Component\Tree\TreeRecursion {
37 public function getChildren($record, $environment =
null): array
42 public function build(
48 $label = $record[
'title']
49 .
' (' . $record[
'type'] .
', ' .
$ref_id .
')';
51 $icon = $environment[
'icon_factory']->standard($record[
"type"],
'');
54 $node =
$factory->simple($label, $icon)
59 $label = $environment[
'modal']->getShowSignal()->getId();
62 ->withOnClick($environment[
'modal']->getShowSignal());
68 protected function getAsyncURL($environment,
string $ref_id):
string
70 $url = $environment[
'url'];
84 $f =
$DIC->ui()->factory();
85 $renderer =
$DIC->ui()->renderer();
86 $image =
$f->image()->responsive(
"src/UI/examples/Image/mountains.jpg",
"Image source: https://stocksnap.io, Creative Commons CC0 license");
87 $page =
$f->modal()->lightboxImagePage($image,
'Mountains');
88 $modal =
$f->modal()->lightbox($page);
91 'url' =>
$DIC->http()->request()->getRequestTarget(),
93 'icon_factory' =>
$f->symbol()->icon()
96 $tree =
$f->tree()->expandable(
"Label", $recursion)
97 ->withEnvironment($environment)
101 return $renderer->render([$modal, $tree]);
103 echo $renderer->renderAsync([$modal, $tree->withIsSubTree(
true)]);
This describes a Tree Node.
This is how the factory for UI elements looks.
if(! $DIC->user() ->getId()||!ilLTIConsumerAccess::hasCustomProviderCreationAccess()) $params
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
if( $request_wrapper->has( 'async_ref') &&$request_wrapper->retrieve( 'async_ref', $refinery->kindlyTo() ->bool())) expandable_async_repo($ref=null)
Class ChatMainBarProvider \MainMenu\Provider.