remove debug notes

This commit is contained in:
Daniel Seifert 2020-05-29 10:20:22 +02:00
parent fcb4a364d0
commit 56d461a2ae
2 changed files with 16 additions and 4 deletions

View File

@ -29,6 +29,8 @@ class orderPdfGenerator
* @param $sFilename * @param $sFilename
* @param int $iSelLang * @param int $iSelLang
* @param string $target * @param string $target
*
* @throws d3noPdfHandlerFoundException
*/ */
public function generatePdf(Order $order, $sFilename, $iSelLang = 0, $target = 'I') public function generatePdf(Order $order, $sFilename, $iSelLang = 0, $target = 'I')
{ {
@ -38,24 +40,26 @@ class orderPdfGenerator
$Pdf->genPdf($sFilename, $iSelLang, $target); $Pdf->genPdf($sFilename, $iSelLang, $target);
} }
/**
* @param Order $order
*
* @return OrderPdfInterface
* @throws d3noPdfHandlerFoundException
*/
public function getPdfClass(Order $order) public function getPdfClass(Order $order)
{ {
echo __CLASS__." - ".__FUNCTION__." - ".__LINE__."<br>";
switch (Registry::getRequest()->getRequestParameter('pdftype')) { switch (Registry::getRequest()->getRequestParameter('pdftype')) {
case ('dnote'): case ('dnote'):
case ('dnote_without_logo'): case ('dnote_without_logo'):
echo __CLASS__." - ".__FUNCTION__." - ".__LINE__."<br>";
$pdfInstance= oxNew(deliverynotePdf::class); $pdfInstance= oxNew(deliverynotePdf::class);
$pdfInstance->setOrder($order); $pdfInstance->setOrder($order);
return $pdfInstance; return $pdfInstance;
case ('standart'): case ('standart'):
case('standart_without_logo'): case('standart_without_logo'):
echo __CLASS__." - ".__FUNCTION__." - ".__LINE__."<br>";
$pdfInvoice= oxNew(invoicePdf::class); $pdfInvoice= oxNew(invoicePdf::class);
$pdfInvoice->setOrder($order); $pdfInvoice->setOrder($order);
return $pdfInvoice; return $pdfInvoice;
default: default:
echo __CLASS__." - ".__FUNCTION__." - ".__LINE__."<br>";
return $this->getCustomPdfClass($order); return $this->getCustomPdfClass($order);
} }
} }

View File

@ -19,6 +19,14 @@ use OxidEsales\Eshop\Core\Exception\StandardException;
class d3noPdfHandlerFoundException extends 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 ) public function __construct( $requestId, $sMessage = "no pdf handler defined for given request id", $iCode = 0, \Exception $previous = null )
{ {
$sMessage .= '"'.$requestId.'"'; $sMessage .= '"'.$requestId.'"';