From 76932e6e8cecfc9f6bc194a0f2ce243c1dc9e03e Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Tue, 1 Feb 2022 17:23:12 +0100 Subject: [PATCH] bugfix in notificationhandler. Not sure about the fix in the template --- .../views/Workflow/_notification_include.html.twig | 2 +- .../Workflow/Notification/WorkflowNotificationHandler.php | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/Bundle/ChillMainBundle/Resources/views/Workflow/_notification_include.html.twig b/src/Bundle/ChillMainBundle/Resources/views/Workflow/_notification_include.html.twig index c20f51193..221ddf4b4 100644 --- a/src/Bundle/ChillMainBundle/Resources/views/Workflow/_notification_include.html.twig +++ b/src/Bundle/ChillMainBundle/Resources/views/Workflow/_notification_include.html.twig @@ -2,7 +2,7 @@

{{ 'workflow_'|trans }}

- {% include handler.templateTitle(l.entity_workflow) with handler.templateTitleData(entity_workflow)|merge({ + {% include handler.templateTitle(entity_workflow) with handler.templateTitleData(entity_workflow)|merge({ 'description': true, 'breadcrumb': true, 'add_classes': 'ms-3 h3' diff --git a/src/Bundle/ChillMainBundle/Workflow/Notification/WorkflowNotificationHandler.php b/src/Bundle/ChillMainBundle/Workflow/Notification/WorkflowNotificationHandler.php index 756d79fbf..2f29afc56 100644 --- a/src/Bundle/ChillMainBundle/Workflow/Notification/WorkflowNotificationHandler.php +++ b/src/Bundle/ChillMainBundle/Workflow/Notification/WorkflowNotificationHandler.php @@ -23,6 +23,12 @@ class WorkflowNotificationHandler implements NotificationHandlerInterface private EntityWorkflowRepository $entityWorkflowRepository; + public function __construct(EntityWorkflowRepository $entityWorkflowRepository, EntityWorkflowManager $entityWorkflowManager) + { + $this->entityWorkflowRepository = $entityWorkflowRepository; + $this->entityWorkflowManager = $entityWorkflowManager; + } + public function getTemplate(Notification $notification, array $options = []): string { return '@ChillMain/Workflow/_notification_include.html.twig';