diff --git a/src/Bundle/ChillDocStoreBundle/Controller/SignatureRequestController.php b/src/Bundle/ChillDocStoreBundle/Controller/SignatureRequestController.php index 3dd99a814..363ecafd4 100644 --- a/src/Bundle/ChillDocStoreBundle/Controller/SignatureRequestController.php +++ b/src/Bundle/ChillDocStoreBundle/Controller/SignatureRequestController.php @@ -33,21 +33,18 @@ class SignatureRequestController #[Route('/api/1.0/document/workflow/{id}/signature-request', name: 'chill_docstore_signature_request')] public function processSignature(EntityWorkflowStepSignature $signature, Request $request): JsonResponse { - dump($signature); - // $signature = $this->signatureRepository($signature); //not useful? - // $entityWorkflow = $signature->getStep()->getEntityWorkflow(); - // $storedObject = $this->entityWorkflowManager->getAssociatedStoredObject($entityWorkflow); - $content = 'blop'; // $this->storedObjectManager->read($storedObject); + $entityWorkflow = $signature->getStep()->getEntityWorkflow(); + $storedObject = $this->entityWorkflowManager->getAssociatedStoredObject($entityWorkflow); + $content = $this->storedObjectManager->read($storedObject); $data = \json_decode((string) $request->getContent(), true, 512, JSON_THROW_ON_ERROR); // TODO parse payload: json_decode ou, mieux, dataTransfertObject - dump($data); $zone = new PDFSignatureZone( $data['zone']['index'], $data['zone']['x'], $data['zone']['y'], $data['zone']['height'], $data['zone']['width'], - $page = new PDFPage($data['zone']['PDFPage']['index'], $data['zone']['PDFPage']['width'], $data['zone']['PDFPage']['height']) + new PDFPage($data['zone']['PDFPage']['index'], $data['zone']['PDFPage']['width'], $data['zone']['PDFPage']['height']) ); $this->messageBus->dispatch(new RequestPdfSignMessage(