Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $this->denyAccessUnlessGranted('GENERATE', $agreement);
- $filePath = $this->get('accesto_hrm.agreement_service')->filePath;
- $file = $this->get('accesto_hrm.agreement_service')->filePath . $agreement->getFileName();
- if(!file_exists ( $file )){
- $this->get('accesto_hrm.agreement_service')->createPdf($agreement);
- return new BinaryFileResponse($filePath . $agreement->getFileName());
- }else{
- return new BinaryFileResponse($filePath . $agreement->getFileName());
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement