chocolatdemariage/www/modules/tntofficiel/libraries/pdf/manifest/HTMLTemplateTNTOfficielManifest.php
Preprod mutu dc0edebeb0 tnt
2017-09-12 10:48:51 +02:00

91 lines
2.7 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';
// HTMLTemplate<NAME>.
class HTMLTemplateTNTOfficielManifest extends HTMLTemplate
{
public $custom_model;
public function __construct($custom_object, $smarty)
{
TNTOfficiel_Debug::log(array('msg' => '>>', 'file' => __FILE__, 'line' => __LINE__));
$this->custom_model = $custom_object;
$this->smarty = $smarty;
// header informations
$id_lang = Context::getContext()->language->id;
$this->title = HTMLTemplateTNTOfficielManifest::l('Titre Test');
// footer informations
$this->shop = new Shop(Context::getContext()->shop->id);
}
/**
* Returns the template's HTML content
* @return string HTML content
*/
public function getContent()
{
TNTOfficiel_Debug::log(array('msg' => '>>', 'file' => __FILE__, 'line' => __LINE__));
$this->smarty->assign(array(
'manifestData' => $this->custom_model,
));
return $this->smarty->fetch(_PS_MODULE_DIR_.'tntofficiel/views/templates/admin/manifest/custom_template_content.tpl');
}
public function getHeader()
{
TNTOfficiel_Debug::log(array('msg' => '>>', 'file' => __FILE__, 'line' => __LINE__));
$this->smarty->assign(array(
'manifestData' => $this->custom_model,
));
return $this->smarty->fetch(_PS_MODULE_DIR_.'tntofficiel/views/templates/admin/manifest/custom_template_header.tpl');
}
/**
* Returns the template filename
* @return string filename
*/
public function getFooter()
{
TNTOfficiel_Debug::log(array('msg' => '>>', 'file' => __FILE__, 'line' => __LINE__));
return $this->smarty->fetch(_PS_MODULE_DIR_.'tntofficiel/views/templates/admin/manifest/custom_template_footer.tpl');
}
/**
* Returns the template filename
* @return string filename
*/
public function getFilename()
{
TNTOfficiel_Debug::log(array('msg' => '>>', 'file' => __FILE__, 'line' => __LINE__));
return 'Manifeste.pdf';
}
/**
* Returns the template filename when using bulk rendering
* @return string filename
*/
public function getBulkFilename()
{
TNTOfficiel_Debug::log(array('msg' => '>>', 'file' => __FILE__, 'line' => __LINE__));
return 'Manifeste.pdf';
}
}