35 lines
1.1 KiB
PHP
35 lines
1.1 KiB
PHP
<?php
|
|
/**
|
|
* TNT OFFICIAL MODULE FOR PRESTASHOP
|
|
*
|
|
* @author GFI Informatique <www.gfi.fr>
|
|
* @copyright 2016-2017 GFI Informatique, 2016-2017 TNT
|
|
* @license https://opensource.org/licenses/MIT MIT License
|
|
*/
|
|
|
|
require_once _PS_MODULE_DIR_.'tntofficiel/libraries/TNTOfficiel_Debug.php';
|
|
require_once(_PS_MODULE_DIR_.'tntofficiel/libraries/pdf/manifest/TNTOfficiel_ManifestPDFGenerator.php');
|
|
|
|
class TNTOfficiel_ManifestPDF extends PDF
|
|
{
|
|
/**
|
|
* Constructor
|
|
* @param $objects
|
|
* @param $template
|
|
* @param $smarty
|
|
* @param string $orientation
|
|
*/
|
|
public function __construct($objects, $template, $smarty, $orientation = 'P')
|
|
{
|
|
TNTOfficiel_Debug::log(array('msg' => '>>', 'file' => __FILE__, 'line' => __LINE__));
|
|
|
|
$this->pdf_renderer = new TNTOfficiel_ManifestPDFGenerator((bool)Configuration::get('PS_PDF_USE_CACHE'), $orientation);
|
|
$this->template = $template;
|
|
$this->smarty = $smarty;
|
|
$this->objects = $objects;
|
|
if (!($objects instanceof Iterator) && !is_array($objects))
|
|
$this->objects = array($objects);
|
|
}
|
|
|
|
}
|