public function downloadPdfClick($action, $id) { /** @var InvoiceEntity $invoice */ $invoice = $this->invoiceRepository->find($id); $action->grid->presenter->sendResponse(new FileResponse($invoice->revisions->first()->getFile()->getFilePath())); }
/** * @return InvoiceEntity */ public function getCurrentInvoice() { return $this->invoiceRepository->find($this->invoice); }