3 declare(strict_types=1);
45 if (!empty($component->getAction())) {
46 $tpl->touchBlock(
"action_begin");
48 if (is_string($component->getAction())) {
49 $tpl->setCurrentBlock(
"with_href");
50 $tpl->setVariable(
"HREF", $component->getAction());
51 $tpl->parseCurrentBlock();
54 if (is_array($component->getAction())) {
55 $tpl->setCurrentBlock(
"with_href");
56 $tpl->setVariable(
"HREF",
"#");
57 $tpl->parseCurrentBlock();
58 $tpl->setCurrentBlock(
"with_id");
60 $tpl->parseCurrentBlock();
64 if (!is_array($component->getAction()) &&
$id !== null) {
65 $tpl->setVariable(
"IMG_ID",
" id='" .
$id .
"' ");
68 $tpl->setCurrentBlock($component->getType());
69 $tpl->setVariable(
"SOURCE", $component->getSource());
70 $tpl->setVariable(
"ALT", htmlspecialchars($component->getAlt()));
71 $tpl->parseCurrentBlock();
73 if (!empty($component->getAction())) {
74 $tpl->touchBlock(
"action_end");
85 return [Component\Image\Image::class];
getComponentInterfaceName()
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...
getTemplate(string $name, bool $purge_unfilled_vars, bool $purge_unused_blocks)
Get template of component this renderer is made for.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
render(Component $component, Renderer $default_renderer)
Render the component if possible and delegate additional rendering to the default_renderer.
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
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.