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:
parent
7bb9c8e25f
commit
29aaa363b4
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue