diff --git a/src/Bundle/ChillPersonBundle/Workflow/AccompanyingPeriodWorkEvaluationDocumentWorkflowHandler.php b/src/Bundle/ChillPersonBundle/Workflow/AccompanyingPeriodWorkEvaluationDocumentWorkflowHandler.php index 861dd4cb9..e2f8e7666 100644 --- a/src/Bundle/ChillPersonBundle/Workflow/AccompanyingPeriodWorkEvaluationDocumentWorkflowHandler.php +++ b/src/Bundle/ChillPersonBundle/Workflow/AccompanyingPeriodWorkEvaluationDocumentWorkflowHandler.php @@ -12,10 +12,14 @@ declare(strict_types=1); namespace Chill\PersonBundle\Workflow; use Chill\DocStoreBundle\Entity\StoredObject; +use Chill\DocStoreBundle\Workflow\WorkflowWithPublicViewDocumentHelper; use Chill\MainBundle\Entity\Workflow\EntityWorkflow; +use Chill\MainBundle\Entity\Workflow\EntityWorkflowSend; use Chill\MainBundle\Repository\Workflow\EntityWorkflowRepository; use Chill\MainBundle\Templating\TranslatableStringHelperInterface; +use Chill\MainBundle\Workflow\EntityWorkflowWithPublicViewInterface; use Chill\MainBundle\Workflow\EntityWorkflowWithStoredObjectHandlerInterface; +use Chill\MainBundle\Workflow\Templating\EntityWorkflowViewMetadataDTO; use Chill\PersonBundle\Entity\AccompanyingPeriod\AccompanyingPeriodWorkEvaluationDocument; use Chill\PersonBundle\Repository\AccompanyingPeriod\AccompanyingPeriodWorkEvaluationDocumentRepository; use Chill\PersonBundle\Security\Authorization\AccompanyingPeriodWorkEvaluationDocumentVoter; @@ -24,13 +28,14 @@ use Symfony\Contracts\Translation\TranslatorInterface; /** * @implements EntityWorkflowWithStoredObjectHandlerInterface */ -class AccompanyingPeriodWorkEvaluationDocumentWorkflowHandler implements EntityWorkflowWithStoredObjectHandlerInterface +class AccompanyingPeriodWorkEvaluationDocumentWorkflowHandler implements EntityWorkflowWithStoredObjectHandlerInterface, EntityWorkflowWithPublicViewInterface { public function __construct( private readonly AccompanyingPeriodWorkEvaluationDocumentRepository $repository, private readonly EntityWorkflowRepository $workflowRepository, private readonly TranslatableStringHelperInterface $translatableStringHelper, private readonly TranslatorInterface $translator, + private readonly WorkflowWithPublicViewDocumentHelper $publicViewDocumentHelper, ) {} public function getDeletionRoles(): array @@ -150,4 +155,9 @@ class AccompanyingPeriodWorkEvaluationDocumentWorkflowHandler implements EntityW return $this->workflowRepository->findByRelatedEntity(AccompanyingPeriodWorkEvaluationDocument::class, $object->getId()); } + + public function renderPublicView(EntityWorkflowSend $entityWorkflowSend, EntityWorkflowViewMetadataDTO $metadata): string + { + return $this->publicViewDocumentHelper->render($entityWorkflowSend, $metadata, $this); + } }