18 $tpl_card = $this->
getTemplate(
"tpl.deck_card.html",
true,
true);
19 $tpl_row = $this->
getTemplate(
"tpl.deck_row.html",
true,
true);
21 foreach ($component->getCards() as $card) {
22 $tpl_card->setCurrentBlock(
"card");
23 $tpl_card->setVariable(
"CARD", $default_renderer->render($card));
24 $tpl_card->setVariable(
"SIZE_MD", $component->getCardsSizeForDisplaySize(Deck::SIZE_M));
25 $tpl_card->setVariable(
"SIZE_SM", $component->getCardsSizeForDisplaySize(Deck::SIZE_S));
26 $tpl_card->setVariable(
"SIZE_XS", $component->getCardsSizeForDisplaySize(Deck::SIZE_XS));
27 $tpl_card->setVariable(
"SIZE_LG", $component->getCardsSizeForDisplaySize(Deck::SIZE_L));
28 $tpl_card->parseCurrentBlock();
31 $this->
parseRow($tpl_row, $tpl_card->get());
33 return $tpl_row->get();
36 protected function parseRow($tpl_row, $content)
38 $tpl_row->setCurrentBlock(
"row");
39 $tpl_row->setVariable(
"CARDS", $content);
40 $tpl_row->parseCurrentBlock();
parseRow($tpl_row, $content)
getComponentInterfaceName()
render(Component\Component $component, RendererInterface $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.