Compare commits
3 Commits
2.0.2.0-RC
...
2.0.2.0-RC
Author | SHA1 | Date | |
---|---|---|---|
bd01cf8d3b | |||
875f8e2464 | |||
4e91c42910 |
@ -11,6 +11,7 @@
|
|||||||
namespace D3\PdfDocuments\Application\Controller;
|
namespace D3\PdfDocuments\Application\Controller;
|
||||||
|
|
||||||
use D3\PdfDocuments\Application\Model\Exceptions\noPdfHandlerFoundException;
|
use D3\PdfDocuments\Application\Model\Exceptions\noPdfHandlerFoundException;
|
||||||
|
use D3\PdfDocuments\Application\Model\Exceptions\wrongPdfGeneratorInterface;
|
||||||
use D3\PdfDocuments\Application\Model\Interfaces\pdfdocumentsOrderInterface;
|
use D3\PdfDocuments\Application\Model\Interfaces\pdfdocumentsOrderInterface;
|
||||||
use D3\PdfDocuments\Application\Model\Registries\registryOrderoverview;
|
use D3\PdfDocuments\Application\Model\Registries\registryOrderoverview;
|
||||||
use OxidEsales\Eshop\Application\Model\Order;
|
use OxidEsales\Eshop\Application\Model\Order;
|
||||||
@ -22,6 +23,7 @@ class orderOverviewPdfGenerator
|
|||||||
* @param Order $order
|
* @param Order $order
|
||||||
* @param int $iSelLang
|
* @param int $iSelLang
|
||||||
* @throws noPdfHandlerFoundException
|
* @throws noPdfHandlerFoundException
|
||||||
|
* @throws wrongPdfGeneratorInterface
|
||||||
*/
|
*/
|
||||||
public function generatePdf(Order $order, int $iSelLang = 0)
|
public function generatePdf(Order $order, int $iSelLang = 0)
|
||||||
{
|
{
|
||||||
@ -34,6 +36,7 @@ class orderOverviewPdfGenerator
|
|||||||
/**
|
/**
|
||||||
* @return pdfdocumentsOrderInterface
|
* @return pdfdocumentsOrderInterface
|
||||||
* @throws noPdfHandlerFoundException
|
* @throws noPdfHandlerFoundException
|
||||||
|
* @throws wrongPdfGeneratorInterface
|
||||||
*/
|
*/
|
||||||
public function getPdfClass()
|
public function getPdfClass()
|
||||||
{
|
{
|
||||||
|
@ -12,7 +12,6 @@ namespace D3\PdfDocuments\Application\Model\AbstractClasses;
|
|||||||
|
|
||||||
use Assert\InvalidArgumentException;
|
use Assert\InvalidArgumentException;
|
||||||
use D3\PdfDocuments\Application\Model\Constants;
|
use D3\PdfDocuments\Application\Model\Constants;
|
||||||
use D3\PdfDocuments\Application\Model\Exceptions\pdfGeneratorExceptionAbstract;
|
|
||||||
use D3\PdfDocuments\Application\Model\Interfaces\pdfdocumentsGenericInterface as genericInterface;
|
use D3\PdfDocuments\Application\Model\Interfaces\pdfdocumentsGenericInterface as genericInterface;
|
||||||
use OxidEsales\Eshop\Core\Base;
|
use OxidEsales\Eshop\Core\Base;
|
||||||
use OxidEsales\Eshop\Core\Exception\StandardException;
|
use OxidEsales\Eshop\Core\Exception\StandardException;
|
||||||
@ -20,7 +19,7 @@ use OxidEsales\Eshop\Core\Registry;
|
|||||||
use OxidEsales\Eshop\Core\UtilsView;
|
use OxidEsales\Eshop\Core\UtilsView;
|
||||||
use OxidEsales\EshopCommunity\Internal\Container\ContainerFactory;
|
use OxidEsales\EshopCommunity\Internal\Container\ContainerFactory;
|
||||||
use OxidEsales\EshopCommunity\Internal\Framework\Module\Facade\ModuleSettingServiceInterface;
|
use OxidEsales\EshopCommunity\Internal\Framework\Module\Facade\ModuleSettingServiceInterface;
|
||||||
use OxidEsales\EshopCommunity\Internal\Framework\Templating\TemplateEngineInterface;
|
use OxidEsales\EshopCommunity\Internal\Framework\Templating\TemplateRenderer;
|
||||||
use OxidEsales\EshopCommunity\Internal\Framework\Templating\TemplateRendererBridgeInterface;
|
use OxidEsales\EshopCommunity\Internal\Framework\Templating\TemplateRendererBridgeInterface;
|
||||||
use OxidEsales\Twig\Resolver\TemplateChain\TemplateNotInChainException;
|
use OxidEsales\Twig\Resolver\TemplateChain\TemplateNotInChainException;
|
||||||
use Psr\Container\ContainerExceptionInterface;
|
use Psr\Container\ContainerExceptionInterface;
|
||||||
@ -43,38 +42,9 @@ abstract class pdfdocumentsGeneric extends Base implements genericInterface
|
|||||||
|
|
||||||
public $filenameExtension = 'pdf';
|
public $filenameExtension = 'pdf';
|
||||||
|
|
||||||
/** @var TemplateEngineInterface */
|
|
||||||
public $oTemplateEngine;
|
|
||||||
|
|
||||||
/** @var string */
|
/** @var string */
|
||||||
public $filename;
|
public $filename;
|
||||||
|
|
||||||
/**
|
|
||||||
* pdfDocumentsGeneric constructor.
|
|
||||||
*/
|
|
||||||
public function __construct()
|
|
||||||
{
|
|
||||||
parent::__construct();
|
|
||||||
|
|
||||||
$this->oTemplateEngine = $this->d3GetTemplateEngine();
|
|
||||||
}
|
|
||||||
|
|
||||||
public function d3GetTemplateEngine() :TemplateEngineInterface
|
|
||||||
{
|
|
||||||
$renderer = $this->d3GetTemplateRendererBridge()->getTemplateRenderer();
|
|
||||||
return $renderer->getTemplateEngine();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @throws ContainerExceptionInterface
|
|
||||||
* @throws NotFoundExceptionInterface
|
|
||||||
*/
|
|
||||||
public function d3GetTemplateRendererBridge(): TemplateRendererBridgeInterface
|
|
||||||
{
|
|
||||||
return ContainerFactory::getInstance()->getContainer()
|
|
||||||
->get(TemplateRendererBridgeInterface::class);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function runPreAction()
|
public function runPreAction()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
@ -84,11 +54,14 @@ abstract class pdfdocumentsGeneric extends Base implements genericInterface
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param $sFilename
|
* @param string $sFilename
|
||||||
* @param int $iSelLang
|
* @param int $iSelLang
|
||||||
* @param string $target
|
* @param string $target
|
||||||
|
*
|
||||||
* @return string|null
|
* @return string|null
|
||||||
|
* @throws ContainerExceptionInterface
|
||||||
* @throws Html2PdfException
|
* @throws Html2PdfException
|
||||||
|
* @throws NotFoundExceptionInterface
|
||||||
*/
|
*/
|
||||||
public function genPdf($sFilename, $iSelLang = 0, $target = self::PDF_DESTINATION_STDOUT)
|
public function genPdf($sFilename, $iSelLang = 0, $target = self::PDF_DESTINATION_STDOUT)
|
||||||
{
|
{
|
||||||
@ -96,10 +69,10 @@ abstract class pdfdocumentsGeneric extends Base implements genericInterface
|
|||||||
$oPdf->setTestIsImage(false);
|
$oPdf->setTestIsImage(false);
|
||||||
$htmlContent = $this->getHTMLContent($iSelLang);
|
$htmlContent = $this->getHTMLContent($iSelLang);
|
||||||
$oPdf->writeHTML($htmlContent);
|
$oPdf->writeHTML($htmlContent);
|
||||||
$oPdf->pdf->SetAuthor(Registry::getConfig()->getActiveShop()->getFieldData('oxname'));
|
$oPdf->pdf->setAuthor( Registry::getConfig()->getActiveShop()->getFieldData( 'oxname'));
|
||||||
$oPdf->pdf->SetTitle(Registry::getLang()->translateString($this->getTitleIdent()));
|
$oPdf->pdf->setTitle( Registry::getLang()->translateString( $this->getTitleIdent()));
|
||||||
$oPdf->pdf->SetCreator('DÂł PDF Documents for OXID eShop');
|
$oPdf->pdf->setCreator( 'DÂł PDF Documents for OXID eShop');
|
||||||
$oPdf->pdf->SetSubject(NULL);
|
$oPdf->pdf->setSubject( NULL);
|
||||||
return $this->output($oPdf, $sFilename, $target, $htmlContent);
|
return $this->output($oPdf, $sFilename, $target, $htmlContent);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -107,6 +80,15 @@ abstract class pdfdocumentsGeneric extends Base implements genericInterface
|
|||||||
* @param int $iLanguage
|
* @param int $iLanguage
|
||||||
* @throws Html2PdfException
|
* @throws Html2PdfException
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param $iLanguage
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
* @throws ContainerExceptionInterface
|
||||||
|
* @throws Html2PdfException
|
||||||
|
* @throws NotFoundExceptionInterface
|
||||||
|
*/
|
||||||
public function downloadPdf($iLanguage = 0)
|
public function downloadPdf($iLanguage = 0)
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
@ -115,17 +97,20 @@ abstract class pdfdocumentsGeneric extends Base implements genericInterface
|
|||||||
$this->genPdf($sFilename, $iLanguage, self::PDF_DESTINATION_DOWNLOAD);
|
$this->genPdf($sFilename, $iLanguage, self::PDF_DESTINATION_DOWNLOAD);
|
||||||
$this->runPostAction();
|
$this->runPostAction();
|
||||||
Registry::getUtils()->showMessageAndExit('');
|
Registry::getUtils()->showMessageAndExit('');
|
||||||
} catch (pdfGeneratorExceptionAbstract|InvalidArgumentException $e) {
|
} catch (InvalidArgumentException $e) {
|
||||||
Registry::get(UtilsView::class)->addErrorToDisplay($e);
|
|
||||||
Registry::getLogger()->error($e);
|
Registry::getLogger()->error($e);
|
||||||
|
Registry::get(UtilsView::class)->addErrorToDisplay($e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $path
|
* @param string $path
|
||||||
* @param int $iLanguage
|
* @param int $iLanguage
|
||||||
*
|
*
|
||||||
|
* @return void
|
||||||
|
* @throws ContainerExceptionInterface
|
||||||
* @throws Html2PdfException
|
* @throws Html2PdfException
|
||||||
|
* @throws NotFoundExceptionInterface
|
||||||
*/
|
*/
|
||||||
public function savePdfFile($path, $iLanguage = 0)
|
public function savePdfFile($path, $iLanguage = 0)
|
||||||
{
|
{
|
||||||
@ -138,7 +123,7 @@ abstract class pdfdocumentsGeneric extends Base implements genericInterface
|
|||||||
self::PDF_DESTINATION_FILE
|
self::PDF_DESTINATION_FILE
|
||||||
);
|
);
|
||||||
$this->runPostAction();
|
$this->runPostAction();
|
||||||
} catch (pdfGeneratorExceptionAbstract|InvalidArgumentException $e) {
|
} catch (InvalidArgumentException $e) {
|
||||||
Registry::get(UtilsView::class)->addErrorToDisplay($e);
|
Registry::get(UtilsView::class)->addErrorToDisplay($e);
|
||||||
Registry::getLogger()->error($e);
|
Registry::getLogger()->error($e);
|
||||||
}
|
}
|
||||||
@ -147,8 +132,10 @@ abstract class pdfdocumentsGeneric extends Base implements genericInterface
|
|||||||
/**
|
/**
|
||||||
* @param int $iLanguage
|
* @param int $iLanguage
|
||||||
*
|
*
|
||||||
* @return null|string
|
* @return string|null
|
||||||
|
* @throws ContainerExceptionInterface
|
||||||
* @throws Html2PdfException
|
* @throws Html2PdfException
|
||||||
|
* @throws NotFoundExceptionInterface
|
||||||
*/
|
*/
|
||||||
public function getPdfContent($iLanguage = 0)
|
public function getPdfContent($iLanguage = 0)
|
||||||
{
|
{
|
||||||
@ -158,7 +145,7 @@ abstract class pdfdocumentsGeneric extends Base implements genericInterface
|
|||||||
$ret = $this->genPdf( $sFilename, $iLanguage, self::PDF_DESTINATION_STRING );
|
$ret = $this->genPdf( $sFilename, $iLanguage, self::PDF_DESTINATION_STRING );
|
||||||
$this->runPostAction();
|
$this->runPostAction();
|
||||||
return $ret;
|
return $ret;
|
||||||
} catch (pdfGeneratorExceptionAbstract|InvalidArgumentException $e) {
|
} catch (InvalidArgumentException $e) {
|
||||||
Registry::get(UtilsView::class)->addErrorToDisplay($e);
|
Registry::get(UtilsView::class)->addErrorToDisplay($e);
|
||||||
Registry::getLogger()->error($e);
|
Registry::getLogger()->error($e);
|
||||||
}
|
}
|
||||||
@ -166,18 +153,17 @@ abstract class pdfdocumentsGeneric extends Base implements genericInterface
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
public function getTemplateEngineVars(int $iSelLang): array
|
||||||
* @param int $iSelLang
|
|
||||||
*/
|
|
||||||
public function setTemplateEngineVars(int $iSelLang)
|
|
||||||
{
|
{
|
||||||
unset($iSelLang);
|
unset($iSelLang);
|
||||||
|
|
||||||
$this->oTemplateEngine->addGlobal('config', Registry::getConfig());
|
return [
|
||||||
$this->oTemplateEngine->addGlobal('oViewConf', Registry::getConfig()->getActiveView()->getViewConfig());
|
'config' => Registry::getConfig(),
|
||||||
$this->oTemplateEngine->addGlobal('shop', Registry::getConfig()->getActiveShop());
|
'oViewConf' => Registry::getConfig()->getActiveView()->getViewConfig(),
|
||||||
$this->oTemplateEngine->addGlobal('lang', Registry::getLang());
|
'shop' => Registry::getConfig()->getActiveShop(),
|
||||||
$this->oTemplateEngine->addGlobal('document', $this);
|
'lang' => Registry::getLang(),
|
||||||
|
'document' => $this
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -196,10 +182,11 @@ abstract class pdfdocumentsGeneric extends Base implements genericInterface
|
|||||||
$currTplLang = $lang->getTplLanguage();
|
$currTplLang = $lang->getTplLanguage();
|
||||||
$lang->setTplLanguage($iSelLang);
|
$lang->setTplLanguage($iSelLang);
|
||||||
|
|
||||||
$this->setTemplateEngineVars($iSelLang);
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$content = $this->oTemplateEngine->render($this->getTemplate(), $this->d3GetTemplateEngine()->getGlobals());
|
$content = $this->getTemplateRenderer()->renderTemplate(
|
||||||
|
$this->getTemplate(),
|
||||||
|
$this->getTemplateEngineVars($iSelLang)
|
||||||
|
);
|
||||||
} catch (Error|TemplateNotInChainException $error) {
|
} catch (Error|TemplateNotInChainException $error) {
|
||||||
|
|
||||||
//Registry::getLogger()->error(dumpVar(__METHOD__." ".__LINE__), [$error->getFile()]);
|
//Registry::getLogger()->error(dumpVar(__METHOD__." ".__LINE__), [$error->getFile()]);
|
||||||
@ -214,6 +201,13 @@ abstract class pdfdocumentsGeneric extends Base implements genericInterface
|
|||||||
return $content;
|
return $content;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected function getTemplateRenderer(): TemplateRenderer
|
||||||
|
{
|
||||||
|
return ContainerFactory::getInstance()->getContainer()
|
||||||
|
->get(TemplateRendererBridgeInterface::class)
|
||||||
|
->getTemplateRenderer();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* arguments for Html2Pdf class constructor
|
* arguments for Html2Pdf class constructor
|
||||||
* - $orientation = 'P',
|
* - $orientation = 'P',
|
||||||
|
@ -57,19 +57,22 @@ abstract class pdfdocumentsOrder extends pdfdocumentsGeneric implements orderInt
|
|||||||
* @param int $iSelLang
|
* @param int $iSelLang
|
||||||
* @throws InvalidArgumentException
|
* @throws InvalidArgumentException
|
||||||
*/
|
*/
|
||||||
public function setTemplateEngineVars($iSelLang)
|
public function getTemplateEngineVars($iSelLang): array
|
||||||
{
|
{
|
||||||
parent::setTemplateEngineVars($iSelLang);
|
|
||||||
|
|
||||||
$this->oTemplateEngine->addGlobal('order', $this->getOrder());
|
|
||||||
|
|
||||||
$oUser = oxNew(User::Class);
|
$oUser = oxNew(User::Class);
|
||||||
$oUser->load($this->getOrder()->getFieldData('oxuserid'));
|
$oUser->load($this->getOrder()->getFieldData('oxuserid'));
|
||||||
$this->oTemplateEngine->addGlobal('user', $oUser);
|
|
||||||
|
|
||||||
$oPayment = oxNew(Payment::class);
|
$oPayment = oxNew(Payment::class);
|
||||||
$oPayment->loadInLang($iSelLang, $this->getOrder()->getFieldData('oxpaymenttype'));
|
$oPayment->loadInLang($iSelLang, $this->getOrder()->getFieldData('oxpaymenttype'));
|
||||||
$this->oTemplateEngine->addGlobal('payment', $oPayment);
|
|
||||||
|
return array_merge(
|
||||||
|
parent::getTemplateEngineVars($iSelLang),
|
||||||
|
[
|
||||||
|
'order' => $this->getOrder(),
|
||||||
|
'user' => $oUser,
|
||||||
|
'payment' => $oPayment
|
||||||
|
]
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -39,7 +39,8 @@ class invoicewithoutlogoPdf extends invoicePdf
|
|||||||
/**
|
/**
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function getTemplate(){
|
public function getTemplate()
|
||||||
|
{
|
||||||
return '@d3PdfDocuments/documents/invoice/invoiceNoLogo';
|
return '@d3PdfDocuments/documents/invoice/invoiceNoLogo';
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -28,6 +28,8 @@ abstract class registryAbstract implements registryGenericInterface
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param $className
|
* @param $className
|
||||||
|
*
|
||||||
|
* @throws wrongPdfGeneratorInterface
|
||||||
*/
|
*/
|
||||||
public function addGenerator($className)
|
public function addGenerator($className)
|
||||||
{
|
{
|
||||||
@ -44,6 +46,7 @@ abstract class registryAbstract implements registryGenericInterface
|
|||||||
/**
|
/**
|
||||||
* @param $className * generator fully qualified class name
|
* @param $className * generator fully qualified class name
|
||||||
* @param pdfdocumentsGenericInterface $item
|
* @param pdfdocumentsGenericInterface $item
|
||||||
|
* @throws wrongPdfGeneratorInterface
|
||||||
*/
|
*/
|
||||||
protected function addItem($className, pdfdocumentsGenericInterface $item)
|
protected function addItem($className, pdfdocumentsGenericInterface $item)
|
||||||
{
|
{
|
||||||
|
@ -14,10 +14,14 @@ use D3\PdfDocuments\Application\Model\Documents\deliverynotePdf;
|
|||||||
use D3\PdfDocuments\Application\Model\Documents\deliverynotewithoutlogoPdf;
|
use D3\PdfDocuments\Application\Model\Documents\deliverynotewithoutlogoPdf;
|
||||||
use D3\PdfDocuments\Application\Model\Documents\invoicePdf;
|
use D3\PdfDocuments\Application\Model\Documents\invoicePdf;
|
||||||
use D3\PdfDocuments\Application\Model\Documents\invoicewithoutlogoPdf;
|
use D3\PdfDocuments\Application\Model\Documents\invoicewithoutlogoPdf;
|
||||||
|
use D3\PdfDocuments\Application\Model\Exceptions\wrongPdfGeneratorInterface;
|
||||||
use D3\PdfDocuments\Application\Model\Interfaces\pdfdocumentsOrderInterface;
|
use D3\PdfDocuments\Application\Model\Interfaces\pdfdocumentsOrderInterface;
|
||||||
|
|
||||||
class registryOrdermanagerActions extends registryAbstract implements registryOrdermanagerActionsInterface
|
class registryOrdermanagerActions extends registryAbstract implements registryOrdermanagerActionsInterface
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* @throws wrongPdfGeneratorInterface
|
||||||
|
*/
|
||||||
public function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
$this->addGenerator(invoicePdf::class);
|
$this->addGenerator(invoicePdf::class);
|
||||||
|
@ -14,10 +14,14 @@ use D3\PdfDocuments\Application\Model\Documents\deliverynotePdf;
|
|||||||
use D3\PdfDocuments\Application\Model\Documents\deliverynotewithoutlogoPdf;
|
use D3\PdfDocuments\Application\Model\Documents\deliverynotewithoutlogoPdf;
|
||||||
use D3\PdfDocuments\Application\Model\Documents\invoicePdf;
|
use D3\PdfDocuments\Application\Model\Documents\invoicePdf;
|
||||||
use D3\PdfDocuments\Application\Model\Documents\invoicewithoutlogoPdf;
|
use D3\PdfDocuments\Application\Model\Documents\invoicewithoutlogoPdf;
|
||||||
|
use D3\PdfDocuments\Application\Model\Exceptions\wrongPdfGeneratorInterface;
|
||||||
use D3\PdfDocuments\Application\Model\Interfaces\pdfdocumentsOrderInterface;
|
use D3\PdfDocuments\Application\Model\Interfaces\pdfdocumentsOrderInterface;
|
||||||
|
|
||||||
class registryOrderoverview extends registryAbstract implements registryOrderoverviewInterface
|
class registryOrderoverview extends registryAbstract implements registryOrderoverviewInterface
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* @throws wrongPdfGeneratorInterface
|
||||||
|
*/
|
||||||
public function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
$this->addGenerator(invoicePdf::class);
|
$this->addGenerator(invoicePdf::class);
|
||||||
|
@ -13,6 +13,7 @@ namespace D3\PdfDocuments\Modules\Application\Controller;
|
|||||||
use D3\PdfDocuments\Application\Controller\orderOverviewPdfGenerator;
|
use D3\PdfDocuments\Application\Controller\orderOverviewPdfGenerator;
|
||||||
use D3\PdfDocuments\Application\Model\Exceptions\noPdfHandlerFoundException;
|
use D3\PdfDocuments\Application\Model\Exceptions\noPdfHandlerFoundException;
|
||||||
use D3\PdfDocuments\Application\Model\Exceptions\pdfGeneratorExceptionAbstract;
|
use D3\PdfDocuments\Application\Model\Exceptions\pdfGeneratorExceptionAbstract;
|
||||||
|
use D3\PdfDocuments\Application\Model\Exceptions\wrongPdfGeneratorInterface;
|
||||||
use D3\PdfDocuments\Application\Model\Registries\registryOrderoverview;
|
use D3\PdfDocuments\Application\Model\Registries\registryOrderoverview;
|
||||||
use Doctrine\DBAL\Driver\Exception;
|
use Doctrine\DBAL\Driver\Exception;
|
||||||
use Doctrine\DBAL\Exception as DBALException;
|
use Doctrine\DBAL\Exception as DBALException;
|
||||||
@ -77,6 +78,10 @@ class d3_overview_controller_pdfdocuments extends d3_overview_controller_pdfdocu
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return registryOrderoverview
|
||||||
|
* @throws wrongPdfGeneratorInterface
|
||||||
|
*/
|
||||||
public function d3getGeneratorList(): registryOrderoverview
|
public function d3getGeneratorList(): registryOrderoverview
|
||||||
{
|
{
|
||||||
return oxNew(registryOrderoverview::class);
|
return oxNew(registryOrderoverview::class);
|
||||||
|
@ -12,14 +12,8 @@ use D3\PdfDocuments\Application\Model\Constants as Constants;
|
|||||||
use D3\PdfDocuments\Modules\Application\Controller\d3_overview_controller_pdfdocuments;
|
use D3\PdfDocuments\Modules\Application\Controller\d3_overview_controller_pdfdocuments;
|
||||||
use OxidEsales\Eshop\Application\Controller\Admin\OrderOverview;
|
use OxidEsales\Eshop\Application\Controller\Admin\OrderOverview;
|
||||||
|
|
||||||
/**
|
|
||||||
* Metadata version
|
|
||||||
*/
|
|
||||||
$sMetadataVersion = '2.1';
|
$sMetadataVersion = '2.1';
|
||||||
|
|
||||||
/**
|
|
||||||
* Module information
|
|
||||||
*/
|
|
||||||
$aModule = [
|
$aModule = [
|
||||||
'id' => Constants::OXID_MODULE_ID,
|
'id' => Constants::OXID_MODULE_ID,
|
||||||
'title' => [
|
'title' => [
|
||||||
|
@ -1,19 +1,19 @@
|
|||||||
[{assign var="pagePadding" value=","|explode:"45,15,30,25"}] [{* top, right, bottom, left *}]
|
[{assign var="pagePadding" value=","|explode:"45,15,30,25"}] [{* top, right, bottom, left *}]
|
||||||
[{assign var="showLogo" value=$showLogo|default:true}]
|
[{assign var="showLogo" value=$showLogo|default:true}]
|
||||||
|
|
||||||
[{capture append="pdfBlock_style"}]
|
[{capture assign="pdfBlock_style"}]
|
||||||
[{block name="pdfStyles"}]
|
[{block name="pdfStyles"}]
|
||||||
[{include file="@d3PdfDocuments/assets/d3pdfstyles.css.tpl"}]
|
[{include file="@d3PdfDocuments/assets/d3pdfstyles.css.tpl"}]
|
||||||
[{/block}]
|
[{/block}]
|
||||||
[{/capture}]
|
[{/capture}]
|
||||||
|
|
||||||
[{capture append="pdfBlock_header"}]
|
[{capture assign="pdfBlock_header"}]
|
||||||
[{block name="pdfHeader"}]
|
[{block name="pdfHeader"}]
|
||||||
[{include file="@d3PdfDocuments/documents/inc/page/header.tpl" showLogo=$showLogo}]
|
[{include file="@d3PdfDocuments/documents/inc/page/header.tpl" showLogo=$showLogo}]
|
||||||
[{/block}]
|
[{/block}]
|
||||||
[{/capture}]
|
[{/capture}]
|
||||||
|
|
||||||
[{capture append="pdfBlock_content"}]
|
[{capture assign="pdfBlock_content"}]
|
||||||
[{include file="@d3PdfDocuments/documents/inc/elements/foldmarks.tpl" pagePadding=$pagePadding}]
|
[{include file="@d3PdfDocuments/documents/inc/elements/foldmarks.tpl" pagePadding=$pagePadding}]
|
||||||
|
|
||||||
[{block name="pdfAddressArea"}]
|
[{block name="pdfAddressArea"}]
|
||||||
@ -37,7 +37,7 @@
|
|||||||
[{/block}]
|
[{/block}]
|
||||||
[{/capture}]
|
[{/capture}]
|
||||||
|
|
||||||
[{capture append="pdfBlock_footer"}]
|
[{capture assign="pdfBlock_footer"}]
|
||||||
[{block name="pdfFooter"}]
|
[{block name="pdfFooter"}]
|
||||||
[{include file="@d3PdfDocuments/documents/inc/page/footer.tpl" pagePadding=$pagePadding}]
|
[{include file="@d3PdfDocuments/documents/inc/page/footer.tpl" pagePadding=$pagePadding}]
|
||||||
[{/block}]
|
[{/block}]
|
||||||
|
@ -1,19 +1,19 @@
|
|||||||
[{assign var="pagePadding" value=","|explode:"45,15,30,25"}] [{* top, right, bottom, left *}]
|
[{assign var="pagePadding" value=","|explode:"45,15,30,25"}] [{* top, right, bottom, left *}]
|
||||||
[{assign var="showLogo" value=$showLogo|default:true}]
|
[{assign var="showLogo" value=$showLogo|default:true}]
|
||||||
|
|
||||||
[{capture append="pdfBlock_style"}]
|
[{capture assign="pdfBlock_style"}]
|
||||||
[{block name="pdfStyles"}]
|
[{block name="pdfStyles"}]
|
||||||
[{include file="@d3PdfDocuments/assets/d3pdfstyles.css.tpl"}]
|
[{include file="@d3PdfDocuments/assets/d3pdfstyles.css.tpl"}]
|
||||||
[{/block}]
|
[{/block}]
|
||||||
[{/capture}]
|
[{/capture}]
|
||||||
|
|
||||||
[{capture append="pdfBlock_header"}]
|
[{capture assign="pdfBlock_header"}]
|
||||||
[{block name="pdfHeader"}]
|
[{block name="pdfHeader"}]
|
||||||
[{include file="@d3PdfDocuments/documents/inc/page/header.tpl" showLogo=$showLogo}]
|
[{include file="@d3PdfDocuments/documents/inc/page/header.tpl" showLogo=$showLogo}]
|
||||||
[{/block}]
|
[{/block}]
|
||||||
[{/capture}]
|
[{/capture}]
|
||||||
|
|
||||||
[{capture append="pdfBlock_content"}]
|
[{capture assign="pdfBlock_content"}]
|
||||||
[{* include file="@d3PdfDocuments/documents/inc/helper/rulers" pagePadding=$pagePadding *}]
|
[{* include file="@d3PdfDocuments/documents/inc/helper/rulers" pagePadding=$pagePadding *}]
|
||||||
[{include file="@d3PdfDocuments/documents/inc/elements/foldmarks.tpl" pagePadding=$pagePadding}]
|
[{include file="@d3PdfDocuments/documents/inc/elements/foldmarks.tpl" pagePadding=$pagePadding}]
|
||||||
|
|
||||||
@ -42,7 +42,7 @@
|
|||||||
[{/block}]
|
[{/block}]
|
||||||
[{/capture}]
|
[{/capture}]
|
||||||
|
|
||||||
[{capture append="pdfBlock_footer"}]
|
[{capture assign="pdfBlock_footer"}]
|
||||||
[{block name="pdfFooter"}]
|
[{block name="pdfFooter"}]
|
||||||
[{include file="@d3PdfDocuments/documents/inc/page/footer.tpl" pagePadding=$pagePadding}]
|
[{include file="@d3PdfDocuments/documents/inc/page/footer.tpl" pagePadding=$pagePadding}]
|
||||||
[{/block}]
|
[{/block}]
|
||||||
|
Reference in New Issue
Block a user