From 5e93950bc3746846ab1ca45d8c9fca10f917989f Mon Sep 17 00:00:00 2001 From: Hugo Carvalho Date: Wed, 2 Oct 2019 22:15:14 -0300 Subject: [PATCH] Update templates processing docs Adding save() and saveAs() methods docs --- docs/templates-processing.rst | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/docs/templates-processing.rst b/docs/templates-processing.rst index 5b32aa18..2e8de3a4 100644 --- a/docs/templates-processing.rst +++ b/docs/templates-processing.rst @@ -244,3 +244,20 @@ See ``Sample_40_TemplateSetComplexValue.php`` for examples. $table->addCell(150)->addText('Cell B2'); $table->addCell(150)->addText('Cell B3'); $templateProcessor->setComplexBlock('table', $table); + +save +""""""""" +Saves the loaded template within the current directory. Returns the file path. + +.. code-block:: php + + $filepath = $templateProcessor->save(); + +saveAs +""""""""" +Saves a copy of the loaded template in the indicated path. + +.. code-block:: php + + $pathToSave = 'path/to/save/file.ext'; + $templateProcessor->saveAs($pathToSave);