mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-05 22:35:01 +00:00
Add public workflow view functionality
Introduced the ability to render public views for workflows, including new templates, handlers, and metadata support. Updated entity interfaces and translations to enhance the public sharing of workflow documents.
This commit is contained in:
@@ -15,6 +15,7 @@ use Chill\MainBundle\Entity\Workflow\EntityWorkflowSend;
|
||||
use Chill\MainBundle\Entity\Workflow\EntityWorkflowSendView;
|
||||
use Chill\MainBundle\Workflow\EntityWorkflowManager;
|
||||
use Chill\MainBundle\Workflow\Exception\HandlerWithPublicViewNotFoundException;
|
||||
use Chill\MainBundle\Workflow\Templating\EntityWorkflowViewMetadataDTO;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Psr\Log\LoggerInterface;
|
||||
use Symfony\Component\Clock\ClockInterface;
|
||||
@@ -64,8 +65,12 @@ final readonly class WorkflowViewSendPublicController
|
||||
}
|
||||
|
||||
try {
|
||||
$metadata = new EntityWorkflowViewMetadataDTO(
|
||||
$workflowSend->getViews()->count(),
|
||||
100 - $workflowSend->getViews()->count(),
|
||||
);
|
||||
$response = new Response(
|
||||
$this->entityWorkflowManager->renderPublicView($workflowSend),
|
||||
$this->entityWorkflowManager->renderPublicView($workflowSend, $metadata),
|
||||
);
|
||||
|
||||
$view = new EntityWorkflowSendView($workflowSend, $this->clock->now(), $request->getClientIp());
|
||||
|
Reference in New Issue
Block a user