InvoiceTemplateManager extends AppModel
Invoice template manager. Handles fetches invoice templates
Table of Contents
Methods
| __construct() | Initialize InvoiceTemplateManager |
| getAll() | Lists all available invoice templates |
| getPaperSizes() | Fetches all supported paper sizes |
| getPdfFonts() | Returns all fonts available to the PDF library |
| getTemplateInfo() | Fetch information about the given invoice template object |
| loadTemplate() | Instantiates the given invoice template and returns its instance |
Methods
__construct()
Initialize InvoiceTemplateManager
public
__construct() : mixed
getAll()
Lists all available invoice templates
public
getAll() : array<string|int, mixed>
Return values
array<string|int, mixed> —An array of stdClass objects representing available invoice templates
getPaperSizes()
Fetches all supported paper sizes
public
getPaperSizes() : array<string|int, mixed>
Return values
array<string|int, mixed> —A list of supported paper sizes and their language names
getPdfFonts()
Returns all fonts available to the PDF library
public
getPdfFonts() : array<string|int, mixed>
Return values
array<string|int, mixed> —A list of fonts available
getTemplateInfo()
Fetch information about the given invoice template object
private
getTemplateInfo(object $template) : mixed
Parameters
- $template : object
-
The invoice template object to fetch info on
loadTemplate()
Instantiates the given invoice template and returns its instance
private
loadTemplate(string $class) : An
Parameters
- $class : string
-
The name of the class in file_case to load
Return values
An —instance of the invoice template specified