19declare(strict_types=1);
33 return "tpl.glyph.standard.html";
54 if ($component->isTabbable() && !$this instanceof ButtonContextRenderer) {
55 $tpl->touchBlock(
"tabbable");
58 if ($component->isHighlighted()) {
59 $tpl->touchBlock(
"highlighted");
62 if (!$component->isActive()) {
63 $tpl->touchBlock(
"disabled");
65 $tpl->setCurrentBlock(
"with_aria_disabled");
66 $tpl->setVariable(
"ARIA_DISABLED",
"true");
67 $tpl->parseCurrentBlock();
75 $tpl->setCurrentBlock(
"with_id");
76 $tpl->setVariable(
"ID",
$id);
77 $tpl->parseCurrentBlock();
80 $tpl->setVariable(
"GLYPH", $this->
getInnerGlyphHTML($component, $default_renderer));
92 $action = $component->getAction();
93 if ($component->isActive() && $action !==
null) {
95 $tpl->
setVariable(
"ACTION", $component->getAction());
103 $tpl = $this->
getTemplate(
'tpl.glyph.html',
true,
true);
105 $tpl->touchBlock($component->getType());
107 $largest_counter = 0;
108 foreach ($component->getCounters() as
$counter) {
109 if ($largest_counter < $counter->getNumber()) {
110 $largest_counter =
$counter->getNumber();
112 $n =
"counter_" .
$counter->getType();
113 $tpl->setCurrentBlock($n);
114 $tpl->setVariable(strtoupper($n), $default_renderer->render(
$counter));
115 $tpl->parseCurrentBlock();
118 if ($largest_counter) {
119 $tpl->setCurrentBlock(
"counter_spacer");
120 $tpl->setVariable(
"COUNTER_SPACER", $largest_counter);
121 $tpl->parseCurrentBlock();
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
renderLabel(Component\Component $component, Template $tpl)
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.
addTriggererOnLoadCode(Triggerer $triggerer)
Add onload-code for triggerer.
getTemplate(string $name, bool $purge_unfilled_vars, bool $purge_unused_blocks)
Get template of component this renderer is made for.
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.
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.