Skip to content

Commit d1a764d

Browse files
committed
Define htmlToPdf in the Hook
This method was always required because it was called by the reporting module assuming that our own implementation of the pdfexport module was the one chosen. Because this behavior exists and our pdfexport module is the only implementation of this hook this is not a breaking change. Strict types have been left out on purpose to be compatible with the already existing implementation.
1 parent 965385c commit d1a764d

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

library/Icinga/Application/Hook/PdfexportHook.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,4 +60,13 @@ abstract public function isSupported();
6060
* @param string $filename The filename for the generated PDF
6161
*/
6262
abstract public function streamPdfFromHtml($html, $filename);
63+
64+
/**
65+
* Render the specified HTML to PDF and return the PDF document as a string
66+
*
67+
* @param ValidHtml $html The HTML to render to PDF
68+
*
69+
* @return string
70+
*/
71+
abstract public function htmlToPdf($html);
6372
}

0 commit comments

Comments
 (0)