src/Controller/Framework/DocTreeController.php
/**
     * Create a response with a CFDocument.
     */
Create a response with a CFDocument.
Create a response with a CFDocument .
protected function respondWithDocumentById(Request $request, int $id): Response
    {
        $newDoc = $this->getDoctrine()->getRepository(LsDoc::class)->find($id);
        if (empty($newDoc)) {
            return new Response('Document not found.', Response::HTTP_NOT_FOUND);
        }
        return $this->exportAction($request, $newDoc);
    }
protected function respondWithDocumentById ( Request $ request , int $ id ) : Response { $ newDoc = $ this -> getDoctrine ( ) -> getRepository ( LsDoc :: class ) -> find ( $ id ) ; if ( empty ( $ newDoc ) ) { return new Response ( 'Document not found.' , Response :: HTTP_NOT_FOUND ) ; } return $ this -> exportAction ( $ request , $ newDoc ) ; }
Create a response with a CFDocument.
Create a response with a CFDocument .
// in this case it has to be a document on this OpenSALT instantiation // if document not found, error