3declare(strict_types=1);
49 $tpl_name =
"tpl.standard.html";
54 if (is_array($items) && count($items) == 0) {
61 if ($label !==
null) {
64 $tpl->setVariable(
"LABEL",
"");
72 : $this->
txt(
"actions");
73 $tpl->setCurrentBlock(
"aria_label");
74 $tpl->setVariable(
"ARIA_LABEL", $aria_label);
75 $tpl->parseCurrentBlock();
85 foreach ($items as $item) {
86 $tpl->setCurrentBlock(
"item");
87 $tpl->setVariable(
"ITEM", $default_renderer->render($item));
88 $tpl->parseCurrentBlock();
102 $tpl->setVariable(
"ID_MENU",
$id.
"_menu");
111 parent::registerResources($registry);
112 $registry->
register(
'./src/UI/templates/js/Dropdown/dropdown.js');
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
This implements commonalities between different types of Dropdowns.
getComponentInterfaceName()
Get the name of the component-interface this renderer is supposed to render.ATTENTION: Fully qualifie...
renderItems(array $items, Template $tpl, RendererInterface $default_renderer)
renderId(JavaScriptBindable $component, Template $tpl)
registerResources(ResourceRegistry $registry)
Announce resources this renderer requires.
renderDropdown(Dropdown $component, RendererInterface $default_renderer)
Base class for all component renderers.
txt(string $id)
Get a text from the language file.
createId()
Get a fresh unique id.
bindJavaScript(JavaScriptBindable $component)
Bind the component to JavaScript.
checkComponent(Component $component)
Check if a given component fits this renderer and throw \LogicError if that is not the case.
getTemplate(string $name, bool $purge_unfilled_vars, bool $purge_unused_blocks)
Get template of component this renderer is made for.
Interface to be extended by components that have the possibility to bind to Javascript.
render(Component $component, Renderer $default_renderer)
Render the component if possible and delegate additional rendering to the default_renderer.
Registry for resources required by rendered output like Javascript or CSS.
register(string $name)
Add a dependency.
Interface to templating as it is used in the UI framework.
setVariable(string $name, $value)
Set a variable in the current block.
An entity that renders components to a string output.
if($DIC->http() ->request() ->getMethod()=="GET" &&isset($DIC->http() ->request() ->getQueryParams()['tex'])) $tpl
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
trait JavaScriptBindable
Trait for components implementing JavaScriptBindable providing standard implementation.