12 use \ILIAS\UI\Implementation\Render\Template;
34 $tpl_name =
"tpl.standard.html";
39 if (is_array($items) && count($items) == 0) {
46 if ($label !== null) {
49 $tpl->setVariable(
"LABEL",
"");
57 : $this->
txt(
"actions");
58 $tpl->setCurrentBlock(
"aria_label");
59 $tpl->setVariable(
"ARIA_LABEL", $aria_label);
60 $tpl->parseCurrentBlock();
70 foreach ($items as $item) {
72 $tpl->
setVariable(
"ITEM", $default_renderer->render($item));
93 parent::registerResources($registry);
94 $registry->
register(
'./src/UI/templates/js/Dropdown/dropdown.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. ...
registerResources(ResourceRegistry $registry)
Announce resources this renderer requires.null
trait JavaScriptBindable
Trait for components implementing JavaScriptBindable providing standard implementation.
renderDropdown(Dropdown $component, RendererInterface $default_renderer)
txt($id)
Get a text from the language file.
maybeRenderId(JavaScriptBindable $component, Template $tpl, $block, $template_var)
register($name)
Add a dependency.
setCurrentBlock($name)
Set the block to work on.
parseCurrentBlock()
Parse the block that is currently worked on.
setVariable($name, $value)
Set a variable in the current block.
render(Component $component, Renderer $default_renderer)
Render the component if possible and delegate additional rendering to the default_renderer.
if($DIC->http() ->request() ->getMethod()=="GET" &&isset($DIC->http() ->request() ->getQueryParams()['tex'])) $tpl
getTemplate($name, $purge_unfilled_vars, $purge_unused_blocks)
Get template of component this renderer is made for.
renderItems(array $items, Template $tpl, RendererInterface $default_renderer)
getComponentInterfaceName()
Base class for all component renderers.
This implements commonalities between different types of Dropdowns.
bindJavaScript(JavaScriptBindable $component)
Bind the component to JavaScript.