pathFinder = $pathFinder; } public function getFilename(): string { return 'Zakaznicka_karta_Podminky_uziti.pdf'; } public function getContent() { $path = $this->pathFinder->dataPath('files/email-attachment/karta_PARTNER.pdf'); if (!file_exists($path)) { throw new InvoiceException('Cannot find source file: '.$path); } return file_get_contents($path); } }