28 $tpl_name =
"tpl.standard.html";
32 $items = $component->getItems();
33 if (count($items) == 0) {
39 $label = $component->getLabel();
40 if ($label !== null) {
41 $tpl->setVariable(
"LABEL", $component->getLabel());
43 $tpl->setVariable(
"LABEL",
"");
48 if ($component->getLabel() ==
"" || $component->getAriaLabel() !=
"") {
49 $aria_label = ($component->getAriaLabel() !=
"")
50 ? $component->getAriaLabel()
51 : $this->
txt(
"actions");
52 $tpl->setCurrentBlock(
"aria_label");
53 $tpl->setVariable(
"ARIA_LABEL", $aria_label);
54 $tpl->parseCurrentBlock();
68 foreach ($items as $item) {
69 $tpl->setCurrentBlock(
"item");
70 $tpl->setVariable(
"ITEM", $default_renderer->render($item));
71 $tpl->parseCurrentBlock();
80 $tpl->setCurrentBlock($block);
81 $tpl->setVariable($template_var,
$id);
82 $tpl->parseCurrentBlock();
96 assert(is_string($block));
98 $clone->touch_blocks[] = $block;
108 parent::registerResources($registry);
109 $registry->
register(
'./src/UI/templates/js/Dropdown/dropdown.js');
withBlocksToBeTouched($block)
Append a block to touch during rendering and return cloned instance.
renderDropdown(Component\Dropdown\Dropdown $component, RendererInterface $default_renderer)
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. ...
registerResources(ResourceRegistry $registry)
Announce resources this renderer requires.null
if(!array_key_exists('StateId', $_REQUEST)) $id
renderItems($items, $tpl, $default_renderer)
maybeRenderId(Component\Component $component, $tpl, $block, $template_var)
txt($id)
Get a text from the language file.
render(Component\Component $component, RendererInterface $default_renderer)
register($name)
Add a dependency.
getTemplate($name, $purge_unfilled_vars, $purge_unused_blocks)
Get template of component this renderer is made for.
getComponentInterfaceName()
Base class for all component renderers.
This implements commonalities between different types of Dropdowns.
bindJavaScript(JavaScriptBindable $component)
Bind the component to JavaScript.