diff --git a/Application/Controller/orderPdfGenerator.php b/Application/Controller/orderPdfGenerator.php
index e701bd1..f752f04 100644
--- a/Application/Controller/orderPdfGenerator.php
+++ b/Application/Controller/orderPdfGenerator.php
@@ -29,6 +29,8 @@ class orderPdfGenerator
* @param $sFilename
* @param int $iSelLang
* @param string $target
+ *
+ * @throws d3noPdfHandlerFoundException
*/
public function generatePdf(Order $order, $sFilename, $iSelLang = 0, $target = 'I')
{
@@ -38,24 +40,26 @@ class orderPdfGenerator
$Pdf->genPdf($sFilename, $iSelLang, $target);
}
+ /**
+ * @param Order $order
+ *
+ * @return OrderPdfInterface
+ * @throws d3noPdfHandlerFoundException
+ */
public function getPdfClass(Order $order)
{
-echo __CLASS__." - ".__FUNCTION__." - ".__LINE__."
";
switch (Registry::getRequest()->getRequestParameter('pdftype')) {
case ('dnote'):
case ('dnote_without_logo'):
-echo __CLASS__." - ".__FUNCTION__." - ".__LINE__."
";
$pdfInstance= oxNew(deliverynotePdf::class);
$pdfInstance->setOrder($order);
return $pdfInstance;
case ('standart'):
case('standart_without_logo'):
-echo __CLASS__." - ".__FUNCTION__." - ".__LINE__."
";
$pdfInvoice= oxNew(invoicePdf::class);
$pdfInvoice->setOrder($order);
return $pdfInvoice;
default:
-echo __CLASS__." - ".__FUNCTION__." - ".__LINE__."
";
return $this->getCustomPdfClass($order);
}
}
diff --git a/Application/Model/Exceptions/d3noPdfHandlerFoundException.php b/Application/Model/Exceptions/d3noPdfHandlerFoundException.php
index 2eb2c3a..7c481d1 100644
--- a/Application/Model/Exceptions/d3noPdfHandlerFoundException.php
+++ b/Application/Model/Exceptions/d3noPdfHandlerFoundException.php
@@ -19,6 +19,14 @@ use OxidEsales\Eshop\Core\Exception\StandardException;
class d3noPdfHandlerFoundException extends StandardException
{
+ /**
+ * d3noPdfHandlerFoundException constructor.
+ *
+ * @param $requestId
+ * @param string $sMessage
+ * @param int $iCode
+ * @param \Exception|null $previous
+ */
public function __construct( $requestId, $sMessage = "no pdf handler defined for given request id", $iCode = 0, \Exception $previous = null )
{
$sMessage .= '"'.$requestId.'"';