19 declare(strict_types=1);
42 return $this->
renderSub($component, $default_renderer);
44 return $this->
renderReport($component, $default_renderer);
52 foreach ($component->getContent() as $item) {
53 $content .= $default_renderer->render($item);
60 $tpl = $this->
getTemplate(
"tpl.standard.html",
true,
true);
61 $tpl = $this->
parseHeader($component, $default_renderer, $tpl);
68 $tpl = $this->
getTemplate(
"tpl.sub.html",
true,
true);
70 $actions = $component->getActions();
72 if ($component->getTitle() !=
"" || $actions !==
null) {
73 $tpl->setCurrentBlock(
"title");
76 if ($actions !==
null) {
77 $tpl->setVariable(
"ACTIONS", $default_renderer->render($actions));
81 $tpl->setVariable(
"TITLE", $component->getTitle());
82 $tpl->parseCurrentBlock();
85 if ($component->getFurtherInformation()) {
86 $tpl->setCurrentBlock(
"with_further_information");
88 $tpl->setVariable(
"INFO", $default_renderer->render($component->getFurtherInformation()));
89 $tpl->parseCurrentBlock();
91 $tpl->setCurrentBlock(
"no_further_information");
93 $tpl->parseCurrentBlock();
101 $tpl = $this->
getTemplate(
"tpl.report.html",
true,
true);
102 $tpl = $this->
parseHeader($component, $default_renderer, $tpl);
112 $view_controls = $component->getViewControls();
113 if ($view_controls) {
114 foreach ($view_controls as $view_control) {
115 $tpl->setCurrentBlock(
"view_controls");
116 $tpl->setVariable(
"VIEW_CONTROL", $default_renderer->render($view_control));
117 $tpl->parseCurrentBlock();
121 $actions = $component->getActions();
122 if ($actions !==
null) {
123 $tpl->setVariable(
"ACTIONS", $default_renderer->render($actions));
126 $tpl->setVariable(
"TITLE", $component->getTitle());
renderSub(Component\Panel\Sub $component, RendererInterface $default_renderer)
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
renderReport(Component\Panel\Report $component, RendererInterface $default_renderer)
getContentAsString(Component\Component $component, RendererInterface $default_renderer)
getTemplate(string $name, bool $purge_unfilled_vars, bool $purge_unused_blocks)
Get template of component this renderer is made for.
render(Component\Component $component, RendererInterface $default_renderer)
cannotHandleComponent(Component $component)
This method MUST be called by derived component renderers, if.
renderStandard(Component\Panel\Standard $component, RendererInterface $default_renderer)
parseHeader(Component\Panel\Standard|Component\Panel\Report $component, RendererInterface $default_renderer, Template $tpl)
Base class for all component renderers.