Conditions | 3 |
Paths | 3 |
Total Lines | 15 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 3.1406 |
Changes | 0 |
1 | <?php |
||
26 | 34 | public function render(AbstractBlock $block, ElementRendererInterface $htmlRenderer, bool $inTightList = false) |
|
27 | { |
||
28 | 34 | if (!$block instanceof TableRow) { |
|
29 | throw new \InvalidArgumentException('Incompatible block type: '.get_class($block)); |
||
30 | } |
||
31 | |||
32 | 34 | $attrs = []; |
|
33 | 34 | foreach ($block->getData('attributes', []) as $key => $value) { |
|
34 | $attrs[$key] = Xml::escape($value); |
||
35 | } |
||
36 | |||
37 | 34 | $separator = $htmlRenderer->getOption('inner_separator', "\n"); |
|
38 | |||
39 | 34 | return new HtmlElement('tr', $attrs, $separator.$htmlRenderer->renderBlocks($block->children()).$separator); |
|
40 | } |
||
41 | } |
||
42 |