allow forced filename
This commit is contained in:
parent
015e85c942
commit
d13dda978d
@ -39,6 +39,9 @@ abstract class pdfdocumentsGeneric extends Base implements genericInterface
|
|||||||
/** @var Smarty */
|
/** @var Smarty */
|
||||||
public $oSmarty;
|
public $oSmarty;
|
||||||
|
|
||||||
|
/** @var string */
|
||||||
|
public $filename;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* pdfDocumentsGeneric constructor.
|
* pdfDocumentsGeneric constructor.
|
||||||
*/
|
*/
|
||||||
@ -126,6 +129,14 @@ abstract class pdfdocumentsGeneric extends Base implements genericInterface
|
|||||||
return [self::PDF_ORIENTATION_PORTRAIT, 'A4', 'de'];
|
return [self::PDF_ORIENTATION_PORTRAIT, 'A4', 'de'];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param $filename
|
||||||
|
*/
|
||||||
|
public function setFilename($filename)
|
||||||
|
{
|
||||||
|
$this->filename = $filename;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets proper file name
|
* Gets proper file name
|
||||||
*
|
*
|
||||||
|
@ -66,6 +66,11 @@ abstract class pdfdocumentsOrder extends pdfdocumentsGeneric implements orderInt
|
|||||||
*/
|
*/
|
||||||
public function getFilename()
|
public function getFilename()
|
||||||
{
|
{
|
||||||
|
// forced filename from setFilename()
|
||||||
|
if ($this->filename) {
|
||||||
|
return $this->filename;
|
||||||
|
}
|
||||||
|
|
||||||
$sTrimmedBillName = trim($this->getOrder()->getFieldData('oxbilllname'));
|
$sTrimmedBillName = trim($this->getOrder()->getFieldData('oxbilllname'));
|
||||||
|
|
||||||
return implode(
|
return implode(
|
||||||
|
@ -56,6 +56,11 @@ interface pdfdocumentsGenericInterface
|
|||||||
*/
|
*/
|
||||||
public function genPdf($sFilename, $iSelLang = 0, $target = 'I');
|
public function genPdf($sFilename, $iSelLang = 0, $target = 'I');
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param string $filename
|
||||||
|
*/
|
||||||
|
public function setFilename($filename);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user