I'm using this classs to extend ExportPdf, but it causes an error if I turn on Export Log.
Fatal error: Uncaught Error: Class "PHPMaker2023\MyProject\AbstractExportBase" not found in /home/[path to site]/src/AbstractExport.php
class MyExportPdf extends ExportPdf {
// Override exportTableheader()
public function exportTableHeader() {
//make sure that table headers for detail tables are also exported
$this->Text .= "<h2 style='font-family: Arial, Helvetica, sans-serif*; padding-top: 10px; page-break-before: avoid; page-break-after: avoid'>" . $this->Table->tableCaption() . "</h2>"; // Add table caption
parent::exportTableHeader(); // Call the parent method
}
}
Config('EXPORT_CLASSES.pdf', 'MyExportPdf'); // Replace the default ExportPDF class by your own class
Config('PAGE_BREAK_HTML', '<div style="page-break-after:avoid; page-break-inside: avoid; page-break-before: avoid;"></div>');
the class is created correctly
If i comment out the code I just posted, there is no error.
So I think the problem is that I'm extending ExportPdf when class ExportPdf extends AbstractExport.
I don't understand how that works fully, all i know is that extending ExportPdf causes the error.