19declare(strict_types=1);
33 return "tpl.glyph.standard.html";
52 $tpl->touchBlock(
"tabbable");
55 if ($component->isHighlighted()) {
56 $tpl->touchBlock(
"highlighted");
59 if (!$component->isActive()) {
60 $tpl->touchBlock(
"disabled");
62 $tpl->setCurrentBlock(
"with_aria_disabled");
63 $tpl->setVariable(
"ARIA_DISABLED",
"true");
64 $tpl->parseCurrentBlock();
72 $tpl->setCurrentBlock(
"with_id");
73 $tpl->setVariable(
"ID",
$id);
74 $tpl->parseCurrentBlock();
77 $tpl->setVariable(
"GLYPH", $this->
getInnerGlyphHTML($component, $default_renderer));
89 $action = $component->getAction();
90 if ($component->isActive() && $action !==
null) {
92 $tpl->
setVariable(
"ACTION", $component->getAction());
100 $tpl = $this->
getTemplate(
'tpl.glyph.html',
true,
true);
102 $tpl->touchBlock($component->getType());
104 $largest_counter = 0;
105 foreach ($component->getCounters() as
$counter) {
106 if ($largest_counter < $counter->getNumber()) {
107 $largest_counter =
$counter->getNumber();
109 $n =
"counter_" .
$counter->getType();
110 $tpl->setCurrentBlock($n);
111 $tpl->setVariable(strtoupper($n), $default_renderer->render(
$counter));
112 $tpl->parseCurrentBlock();
115 if ($largest_counter) {
116 $tpl->setCurrentBlock(
"counter_spacer");
117 $tpl->setVariable(
"COUNTER_SPACER", $largest_counter);
118 $tpl->parseCurrentBlock();
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
renderLabel(Component\Component $component, Template $tpl)
render(Component\Component $component, RendererInterface $default_renderer)
@inheritdocs
getInnerGlyphHTML(Component\Component $component, RendererInterface $default_renderer)
renderAction(Component\Component $component, Template $tpl)
Base class for all component renderers.
cannotHandleComponent(Component $component)
This method MUST be called by derived component renderers, if.
txt(string $id)
Get a text from the language file.
bindJavaScript(JavaScriptBindable $component)
Bind the component to JavaScript.
getTemplate(string $name, bool $purge_unfilled_vars, bool $purge_unused_blocks)
Get template of component this renderer is made for.
Registry for resources required by rendered output like Javascript or CSS.
Interface to templating as it is used in the UI framework.
setVariable(string $name, $value)
Set a variable in the current block.
setCurrentBlock(string $name)
Set the block to work on.
parseCurrentBlock()
Parse the block that is currently worked on.
An entity that renders components to a string output.