29 if (!empty($component->getAction())) {
30 $tpl->touchBlock(
"action_begin");
32 if (is_string($component->getAction())) {
33 $tpl->setCurrentBlock(
"with_href");
34 $tpl->setVariable(
"HREF", $component->getAction());
35 $tpl->parseCurrentBlock();
38 if (is_array($component->getAction())) {
39 $tpl->setCurrentBlock(
"with_id");
41 $tpl->parseCurrentBlock();
45 $tpl->setCurrentBlock($component->getType());
46 $tpl->setVariable(
"SOURCE", $component->getSource());
47 $tpl->setVariable(
"ALT", htmlspecialchars($component->getAlt()));
48 if (empty($component->getAction()) &&
$id !== null) {
49 $tpl->setVariable(
"IMG_ID",
" id='" .
$id .
"' ");
51 $tpl->parseCurrentBlock();
53 if (!empty($component->getAction())) {
54 $tpl->touchBlock(
"action_end");
65 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. ...
if(!array_key_exists('StateId', $_REQUEST)) $id
render(Component $component, Renderer $default_renderer)
Render the component if possible and delegate additional rendering to the default_renderer.
getTemplate($name, $purge_unfilled_vars, $purge_unused_blocks)
Get template of component this renderer is made for.
Base class for all component renderers.
bindJavaScript(JavaScriptBindable $component)
Bind the component to JavaScript.