monthly budget, monthly report, unified report calculation (#2684)

This commit is contained in:
Kevin Papst
2021-08-06 18:38:41 +02:00
committed by GitHub
parent 21f785638c
commit cefd747e91
196 changed files with 5031 additions and 2167 deletions

View File

@@ -9,35 +9,29 @@
namespace App\Export\Renderer;
use App\Activity\ActivityStatisticService;
use App\Project\ProjectStatisticService;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
use Twig\Environment;
final class HtmlRendererFactory
{
/**
* @var Environment
*/
private $twig;
/**
* @var EventDispatcherInterface
*/
private $dispatcher;
/**
* @var ProjectStatisticService
*/
private $projectStatisticService;
private $activityStatisticService;
public function __construct(Environment $twig, EventDispatcherInterface $dispatcher, ProjectStatisticService $projectStatisticService)
public function __construct(Environment $twig, EventDispatcherInterface $dispatcher, ProjectStatisticService $projectStatisticService, ActivityStatisticService $activityStatisticService)
{
$this->twig = $twig;
$this->dispatcher = $dispatcher;
$this->projectStatisticService = $projectStatisticService;
$this->activityStatisticService = $activityStatisticService;
}
public function create(string $id, string $template): HtmlRenderer
{
$renderer = new HtmlRenderer($this->twig, $this->dispatcher, $this->projectStatisticService);
$renderer = new HtmlRenderer($this->twig, $this->dispatcher, $this->projectStatisticService, $this->activityStatisticService);
$renderer->setId($id);
$renderer->setTemplate($template);