3 declare(strict_types=1);
42 return $this->
renderBulky($component, $default_renderer);
44 throw new LogicException(
"Cannot render: " . get_class($component));
52 $action = $component->getAction();
53 $label = $component->getLabel();
54 if ($component->getOpenInNewViewport()) {
55 $tpl->touchBlock(
"open_in_new_viewport");
57 $tpl->setVariable(
"LABEL", $label);
58 $tpl->setVariable(
"HREF", $action);
65 $tpl_name =
"tpl.standard.html";
74 $tpl_name =
"tpl.bulky.html";
76 $renderer = $default_renderer->withAdditionalContext($component);
77 $tpl->setVariable(
"SYMBOL", $renderer->render($component->getSymbol()));
81 $aria_role = $component->getAriaRole();
82 if ($aria_role != null) {
83 $tpl->setCurrentBlock(
"with_aria_role");
84 $tpl->setVariable(
"ARIA_ROLE", $aria_role);
85 $tpl->parseCurrentBlock();
97 Component\Link\Standard::class,
98 Component\Link\Bulky::class
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setStandardVars(string $tpl_name, Component\Link\Link $component)
checkComponent(Component $component)
Check if a given component fits this renderer and throw if that is not the case. ...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
render(Component\Component $component, RendererInterface $default_renderer)
This implements commonalities between Links.
getComponentInterfaceName()
getTemplate(string $name, bool $purge_unfilled_vars, bool $purge_unused_blocks)
Get template of component this renderer is made for.
renderBulky(Component\Link\Bulky $component, RendererInterface $default_renderer)
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
renderStandard(Component\Link\Standard $component)
if($DIC->http() ->request() ->getMethod()=="GET" &&isset($DIC->http() ->request() ->getQueryParams()['tex'])) $tpl
Base class for all component renderers.
bindJavaScript(JavaScriptBindable $component)
Bind the component to JavaScript.