17 $tpl_card = $this->
getTemplate(
"tpl.deck_card.html",
true,
true);
18 $tpl_row = $this->
getTemplate(
"tpl.deck_row.html",
true,
true);
20 $size = $component->getCardsSize();
21 $icons_per_row = 12/
$size;
25 foreach($component->getCards() as $card){
26 $tpl_card->setCurrentBlock(
"card");
27 $tpl_card->setVariable(
"CARD",$default_renderer->render($card,$default_renderer));
28 $tpl_card->setVariable(
"SIZE",
$size);
29 $tpl_card->parseCurrentBlock();
31 if(($i % $icons_per_row ) == 0){
32 $this->
parseRow($tpl_row,$tpl_card->get());
33 $tpl_card = $this->
getTemplate(
"tpl.deck_card.html",
true,
true);
39 $this->
parseRow($tpl_row,$tpl_card->get());
41 return $tpl_row->get();
44 protected function parseRow($tpl_row,$content){
45 $tpl_row->setCurrentBlock(
"row");
46 $tpl_row->setVariable(
"CARDS",$content);
47 $tpl_row->parseCurrentBlock();
parseRow($tpl_row, $content)
getComponentInterfaceName()
render(Component\Component $component, RendererInterface $default_renderer)
Create styles array
The data for the language used.
getTemplate($name, $purge_unfilled_vars, $purge_unused_blocks)
Get template of component this renderer is made for.
Base class for all component renderers.