| Conditions | 2 |
| Paths | 2 |
| Total Lines | 19 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 27 | public function render(ReportInterface $report, Data $data): string |
||
| 28 | { |
||
| 29 | if ([] !== $data->getData()) { |
||
| 30 | $data = [ |
||
| 31 | 'report' => $report, |
||
| 32 | 'values' => $data->getData(), |
||
| 33 | 'labels' => $data->getLabels(), |
||
| 34 | ]; |
||
| 35 | |||
| 36 | $rendererConfiguration = $report->getRendererConfiguration(); |
||
| 37 | |||
| 38 | return $this->templating->render($rendererConfiguration['template'], [ |
||
| 39 | 'data' => $data, |
||
| 40 | 'configuration' => $rendererConfiguration, |
||
| 41 | ]); |
||
| 42 | } |
||
| 43 | |||
| 44 | return $this->templating->render('@OdiseoSyliusReportPlugin/noDataTemplate.html.twig', [ |
||
| 45 | 'report' => $report, |
||
| 46 | ]); |
||
| 54 |