__construct()
__construct(\CGExtensions\reports\report_defn $rpt)
Constructor.
Parameters
\CGExtensions\reports\report_defn | $rpt |
A class to generate a report using a special template for each row or item.
__construct(\CGExtensions\reports\report_defn $rpt)
Constructor.
\CGExtensions\reports\report_defn | $rpt |
set_template(string $tpl)
Set the template to be used for formatting the document.
The document template is a smarty template that should at the minimum consist of a {foreach $items as $item}...{/foreach} loop. Each item in the loop will be an HTML string representing each formatted item.
string | $tpl | The template contents. |
process_template(string $tpl)
Process the specififed template through smarty.
This method will attempt to find the current action module, and given that and the name of the template find the template contents. if the template name ends with .tpl a module file template is assumed. Otherwise, a module database template will be assumed. If a module cannot be determined, then a file template is assumed, using the 'file' smarty resource.
string | $tpl | The name of the template to process. |
report() : \CGExtensions\reports\report_defn
Get the report definition.