Advertisement
Guest User

Untitled

a guest
Feb 12th, 2016
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. $this->denyAccessUnlessGranted('GENERATE', $agreement);
  2. $filePath = $this->get('accesto_hrm.agreement_service')->filePath;
  3. $file = $this->get('accesto_hrm.agreement_service')->filePath . $agreement->getFileName();
  4.  
  5. if(!file_exists ( $file )){
  6. $this->get('accesto_hrm.agreement_service')->createPdf($agreement);
  7.  
  8. return new BinaryFileResponse($filePath . $agreement->getFileName());
  9. }else{
  10. return new BinaryFileResponse($filePath . $agreement->getFileName());
  11. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement