19 declare(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();
txt(string $id)
Get a text from the language file.
getInnerGlyphHTML(Component\Component $component, RendererInterface $default_renderer)
render(Component\Component $component, RendererInterface $default_renderer)
setCurrentBlock(string $name)
Set the block to work on.
setVariable(string $name, $value)
Set a variable in the current block.
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
getTemplate(string $name, bool $purge_unfilled_vars, bool $purge_unused_blocks)
Get template of component this renderer is made for.
cannotHandleComponent(Component $component)
This method MUST be called by derived component renderers, if.
renderAction(Component\Component $component, Template $tpl)
parseCurrentBlock()
Parse the block that is currently worked on.
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Base class for all component renderers.
bindJavaScript(JavaScriptBindable $component)
Bind the component to JavaScript.
renderLabel(Component\Component $component, Template $tpl)