25 if ($component->getImage()) {
26 $tpl->setVariable(
"IMAGE", $default_renderer->render($component->getImage(), $default_renderer));
29 if ($component->isHighlighted()) {
30 $tpl->touchBlock(
"highlight");
32 $tpl->touchBlock(
"no_highlight");
35 $title = $component->getTitle();
37 if (!empty($component->getTitleAction())) {
38 if (is_string($component->getTitleAction())) {
39 $tpl->setCurrentBlock(
"title_action_begin");
40 $tpl->setVariable(
"HREF", $component->getTitleAction());
41 $tpl->parseCurrentBlock();
44 $title = $default_renderer->render($title);
47 if (is_array($component->getTitleAction())) {
48 $tpl->setCurrentBlock(
"title_action_begin");
49 $tpl->setVariable(
"ID", $id);
50 $tpl->parseCurrentBlock();
54 $tpl->setVariable(
"TITLE", $title);
56 if (!empty($component->getTitleAction())) {
57 $tpl->touchBlock(
"title_action_end");
60 if (is_array($component->getSections())) {
61 foreach ($component->getSections() as
$section) {
62 $tpl->setCurrentBlock(
"section");
63 $tpl->setVariable(
"SECTION", $default_renderer->render(
$section, $default_renderer));
64 $tpl->parseCurrentBlock();
69 $tpl->setCurrentBlock(
"action");
71 $obj_icon = $component->getObjectIcon();
72 if ($obj_icon !== null) {
73 $tpl->setVariable(
"OBJECT_ICON", $default_renderer->render($obj_icon, $default_renderer));
76 $progress = $component->getProgress();
77 if ($progress !== null) {
78 $tpl->setVariable(
"PROGRESS_STATUS", $default_renderer->render($progress));
81 $certificate = $component->getCertificateIcon();
82 if ($certificate !== null) {
83 $certificate_icon =
new StandardIcon(
"cert",
"Certificate",
"medium",
false);
84 $certificate_icon = $certificate_icon->withIsOutlined(
true);
85 $tpl->setVariable(
"PROGRESS_STATUS", $default_renderer->render($certificate_icon));
88 $dropdown = $component->getActions();
89 if ($dropdown !== null) {
90 $tpl->setVariable(
"DROPDOWN", $default_renderer->render($dropdown));
93 $tpl->parseCurrentBlock();
if(isset($_FILES['img_file']['size']) && $_FILES['img_file']['size'] > 0) $tpl
checkComponent(Component $component)
Check if a given component fits this renderer and throw if that is not the case. ...
Class ChatMainBarProvider .
getComponentInterfaceName()
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.