customize html and pdf exports with twig templates (#1582)

This commit is contained in:
Kevin Papst
2020-03-23 01:51:02 +01:00
committed by GitHub
parent 1ca1b00d11
commit 33f76f426c
32 changed files with 895 additions and 307 deletions

View File

@@ -12,7 +12,7 @@ namespace App\Export;
final class ServiceExport
{
/**
* @var RendererInterface[]
* @var ExportRendererInterface[]
*/
private $renderer = [];
@@ -21,7 +21,7 @@ final class ServiceExport
*/
private $exporter = [];
public function addRenderer(RendererInterface $renderer): ServiceExport
public function addRenderer(ExportRendererInterface $renderer): ServiceExport
{
$this->renderer[] = $renderer;
@@ -29,14 +29,14 @@ final class ServiceExport
}
/**
* @return RendererInterface[]
* @return ExportRendererInterface[]
*/
public function getRenderer(): array
{
return $this->renderer;
}
public function getRendererById(string $id): ?RendererInterface
public function getRendererById(string $id): ?ExportRendererInterface
{
foreach ($this->renderer as $renderer) {
if ($renderer->getId() === $id) {