remove debug notes

This commit is contained in:
Daniel Seifert 2020-05-29 10:20:22 +02:00
parent 5ffd071954
commit caeaa02aa6
Signed by: DanielS
GPG Key ID: 8A7C4C6ED1915C6F
2 changed files with 16 additions and 4 deletions

View File

@ -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__."<br>";
switch (Registry::getRequest()->getRequestParameter('pdftype')) {
case ('dnote'):
case ('dnote_without_logo'):
echo __CLASS__." - ".__FUNCTION__." - ".__LINE__."<br>";
$pdfInstance= oxNew(deliverynotePdf::class);
$pdfInstance->setOrder($order);
return $pdfInstance;
case ('standart'):
case('standart_without_logo'):
echo __CLASS__." - ".__FUNCTION__." - ".__LINE__."<br>";
$pdfInvoice= oxNew(invoicePdf::class);
$pdfInvoice->setOrder($order);
return $pdfInvoice;
default:
echo __CLASS__." - ".__FUNCTION__." - ".__LINE__."<br>";
return $this->getCustomPdfClass($order);
}
}

View File

@ -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.'"';