implemented first version of invoice printing
This commit is contained in:
@@ -16,23 +16,23 @@ class PdfForm {
|
||||
}
|
||||
|
||||
|
||||
public function render() {
|
||||
public function render($additionalArgs = false): string {
|
||||
$this->layout->setTemplate($this->template);
|
||||
$this->layout->set("ressourcePathPrefix", BASEDIR."/public/");
|
||||
foreach($this->variables as $name => $value) {
|
||||
$this->layout->set($name, $value);
|
||||
}
|
||||
|
||||
$fullpath = $this->layout->renderPDF();
|
||||
$fullpath = $this->layout->renderPDF(false, $additionalArgs);
|
||||
$this->fullpath = $fullpath;
|
||||
$this->returnValues = $this->layout->getReturnedValue();
|
||||
|
||||
return $fullpath;
|
||||
}
|
||||
|
||||
public function download($filename = false) {
|
||||
public function download($filename = false, $additionalArgs = false) {
|
||||
if(!$this->fullpath) {
|
||||
$this->render();
|
||||
$this->render($additionalArgs);
|
||||
}
|
||||
|
||||
$filepath = $this->fullpath;
|
||||
|
||||
Reference in New Issue
Block a user