2 declare(strict_types=1);
22 $html = $this->
renderMenu($component, $default_renderer);
25 $tpl_name =
"tpl.drilldown.html";
27 $tpl->setVariable(
'DRILLDOWN', $html);
29 $component = $component->withAdditionalOnLoadCode(
function ($id) {
30 return "il.UI.menu.drilldown.init('$id');";
33 $tpl->setVariable(
"ID", $id);
51 $tpl_name =
"tpl.menuitem.html";
55 $tpl->setVariable(
'LABEL', $default_renderer->render($label));
57 if ($component instanceof
Menu\
Sub) {
58 if ($component->isInitiallyActive()) {
59 $tpl->touchBlock(
'active');
62 $component = $component->withAdditionalOnLoadCode(
function ($id) {
66 $tpl->setVariable(
"ID", $id);
68 foreach ($component->getItems() as $subitem) {
70 $html = $default_renderer->render($subitem);
74 $tpl->setCurrentBlock(
'subitems');
75 $tpl->setVariable(
'SUBITEMS', $html);
76 $tpl->parseCurrentBlock();
92 $tpl_name =
"tpl.menuitem.html";
95 $label = $default_renderer->render($component);
96 $tpl->setVariable(
'LABEL', $label);
109 if (is_string($label)) {
110 $label = $this->
getUIFactory()->button()->shy($label,
'');
121 parent::registerResources($registry);
122 $registry->register(
'./src/UI/templates/js/Menu/drilldown.js');
if(isset($_FILES['img_file']['size']) && $_FILES['img_file']['size'] > 0) $tpl
checkComponent(Component $component)
Check if a given component fits this renderer and throw if that is not the case. ...
Class ChatMainBarProvider .
getUIFactory()
Get a UI factory.
getTemplate($name, $purge_unfilled_vars, $purge_unused_blocks)
Get template of component this renderer is made for.
Base class for all component renderers.
bindJavaScript(JavaScriptBindable $component)
Bind the component to JavaScript.