25 if ($component->getImage()) {
26 $tpl->setVariable(
"IMAGE", $default_renderer->render($component->getImage()));
29 if ($component->isHighlighted()) {
30 $tpl->touchBlock(
"highlight");
32 $tpl->touchBlock(
"no_highlight");
35 $title = $component->getTitle();
40 if (!empty($component->getTitleAction())) {
41 if (is_string($component->getTitleAction())) {
42 $tpl->setCurrentBlock(
"title_action_begin");
43 $tpl->setVariable(
"HREF", $component->getTitleAction());
44 $tpl->setVariable(
"ID", $id);
45 $tpl->parseCurrentBlock();
47 $title = $default_renderer->render($title);
49 if (is_array($component->getTitleAction())) {
50 $tpl->setCurrentBlock(
"title_action_begin");
51 $tpl->setVariable(
"ID", $id);
52 $tpl->parseCurrentBlock();
56 $tpl->setVariable(
"TITLE", $title);
58 if (!empty($component->getTitleAction())) {
59 $tpl->touchBlock(
"title_action_end");
62 if (is_array($component->getSections())) {
63 foreach ($component->getSections() as
$section) {
64 $tpl->setCurrentBlock(
"section");
65 $tpl->setVariable(
"SECTION", $default_renderer->render(
$section));
66 $tpl->parseCurrentBlock();
71 $tpl->setCurrentBlock(
"action");
73 $obj_icon = $component->getObjectIcon();
74 if ($obj_icon !== null) {
75 $tpl->setVariable(
"OBJECT_ICON", $default_renderer->render($obj_icon));
78 $progress = $component->getProgress();
79 if ($progress !== null) {
80 $tpl->setVariable(
"PROGRESS_STATUS", $default_renderer->render($progress));
83 $certificate = $component->getCertificateIcon();
84 if ($certificate !== null) {
85 $certificate_icon =
new StandardIcon(
"cert",
"Certificate",
"medium",
false);
86 $certificate_icon = $certificate_icon->withIsOutlined(
true);
87 $tpl->setVariable(
"PROGRESS_STATUS", $default_renderer->render($certificate_icon));
90 $dropdown = $component->getActions();
91 if ($dropdown !== null) {
92 $tpl->setVariable(
"DROPDOWN", $default_renderer->render($dropdown));
95 $tpl->parseCurrentBlock();
checkComponent(Component $component)
Check if a given component fits this renderer and throw if that is not the case. ...
Class ChatMainBarProvider .
createId()
Get a fresh unique id.
getComponentInterfaceName()
render(Component $component, Renderer $default_renderer)
Render the component if possible and delegate additional rendering to the default_renderer.
if($DIC->http() ->request() ->getMethod()=="GET" &&isset($DIC->http() ->request() ->getQueryParams()['tex'])) $tpl
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.