Pdf: Utilize an pdfexport hook without calling isSupported()

If it's not supported, users should disable the module. If there
are multiple hooks supported at some point we need to touch this
again anyways. So that should suffice for now.
This commit is contained in:
Johannes Meyer 2020-01-14 10:59:01 +01:00
parent 7bb9c8e25f
commit 29aaa363b4

View File

@ -70,17 +70,14 @@ class Pdf
if (Hook::has('Pdfexport')) {
$pdfexport = Hook::first('Pdfexport');
$pdfexport->streamPdfFromHtml($html, sprintf(
'%s-%s-%d',
$request->getControllerName(),
$request->getActionName(),
time()
));
if ($pdfexport->isSupported()) {
$pdfexport->streamPdfFromHtml($html, sprintf(
'%s-%s-%d',
$request->getControllerName(),
$request->getActionName(),
time()
));
return;
}
return;
}
$options = new Options();