3 declare(strict_types=1);
41 $html = $this->
renderMenu($component, $default_renderer);
45 $back_signal = $component->getBacklinkSignal();
46 $persistence_id = $component->getPersistenceId();
49 ->withOnClick($back_signal)
50 ->withAriaLabel($this->
txt(
'back'));
51 $back_button_html = $default_renderer->render($btn);
53 $component = $component->withAdditionalOnLoadCode(
54 function (
$id) use ($back_signal, $persistence_id) {
55 $params =
"'$id', '$back_signal'";
56 if (is_null($persistence_id)) {
59 $params .=
", '$persistence_id'";
61 return "il.UI.menu.drilldown.init($params);";
66 $tpl_name =
"tpl.drilldown.html";
69 $tpl->setVariable(
'TITLE', $component->getLabel());
70 $tpl->setVariable(
'BACKNAV', $back_button_html);
71 $tpl->setVariable(
'DRILLDOWN', $html);
86 $tpl_menu = $this->
getTemplate(
'tpl.menu.html',
true,
true);
88 $label = $component->getLabel();
89 if (!is_string($label)) {
90 $label = $default_renderer->render($label);
92 $tpl_menu->setVariable(
'LABEL', $label);
95 foreach ($component->getItems() as $item) {
96 $tpl_item = $this->
getTemplate(
'tpl.menuitem.html',
true,
true);
97 $tpl_item->setVariable(
'ITEM', $default_renderer->render($item));
98 $html .= $tpl_item->get();
100 $tpl_menu->setVariable(
'ITEMS', $html);
101 return $tpl_menu->get();
109 parent::registerResources($registry);
110 $registry->
register(
'./src/UI/templates/js/Menu/dist/drilldown.js');
Registry for resources required by rendered output like Javascript or CSS.
checkComponent(Component $component)
Check if a given component fits this renderer and throw if that is not the case. ...
if(! $DIC->user() ->getId()||!ilLTIConsumerAccess::hasCustomProviderCreationAccess()) $params
symbol()
description: purpose: > Symbols are graphical representations of concepts or contexts quickly compre...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
txt(string $id)
Get a text from the language file.
getTemplate(string $name, bool $purge_unfilled_vars, bool $purge_unused_blocks)
Get template of component this renderer is made for.
register(string $name)
Add a dependency.
button()
description: purpose: > Buttons trigger interactions that change the system’s or view's status...
render(Component $component, Renderer $default_renderer)
Render the component if possible and delegate additional rendering to the default_renderer.
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
getUIFactory()
Get a UI factory.
if($DIC->http() ->request() ->getMethod()=="GET" &&isset($DIC->http() ->request() ->getQueryParams()['tex'])) $tpl
Base class for all component renderers.
bindJavaScript(JavaScriptBindable $component)
Bind the component to JavaScript.