ReportPdfExporter
in package
Class ReportPdfExporter
This class is responsible for generating reports in PDF format. It allows the creation of customized PDF reports based on various templates and data sets. The class also provides utilities for formatting, exporting, and handling report data.
Table of Contents
Properties
- $cssPath : string
- $db : MySql
- $lang : Lang
- $partial : Partial
- $reportHierarchyCode : string
- $request : Request
- $subTopics : array<string|int, mixed>
- $templatePath : string
- $topics : array<string|int, mixed>
- $topicSections : array<string|int, mixed>
Methods
- __construct() : mixed
- exportPdf() : string
- Creates report pdf
- getReportData() : array<string|int, mixed>
- Retrieve report data
- createPdfHtmlTemplate() : string
- Creates HTML with the report data
- setResourcesPaths() : void
Properties
$cssPath
private
string
$cssPath
= ''
$db
private
MySql
$db
$lang
private
Lang
$lang
$partial
private
Partial
$partial
$reportHierarchyCode
private
string
$reportHierarchyCode
$request
private
Request
$request
$subTopics
private
array<string|int, mixed>
$subTopics
= []
$templatePath
private
string
$templatePath
= ''
$topics
private
array<string|int, mixed>
$topics
= []
$topicSections
private
array<string|int, mixed>
$topicSections
= ['Cross-Cutting Standards' => ['ESRS1' => ['General Information' => ['ESRS2-BP-1', 'ESRS2-BP-2'], 'Governance Structure' => ['ESRS2-GOV-1', 'ESRS2-GOV-2', 'ESRS2-GOV-3', 'ESRS2-GOV-4', 'ESRS2-GOV-5']], 'ESRS2' => ['Strategy & Business Model' => ['ESRS2-SBM-1', 'ESRS2-SBM-2', 'ESRS2-SBM-3'], 'Stakeholder Engagement' => ['ESRS2-IRO-1', 'ESRS2-IRO-2', 'ESRS2-MDR-P', 'ESRS2-MDR-A', 'ESRS2-MDR-M', 'ESRS2-MDR-T']]], 'Environment' => ['E1', 'E2', 'E3', 'E4', 'E5'], 'Social' => ['S1', 'S2', 'S3', 'S4'], 'Governance' => ['G1']]
Methods
__construct()
public
__construct(Request $request, Partial $partial, MySql $db, Lang $lang) : mixed
Parameters
exportPdf()
Creates report pdf
public
exportPdf(int $reportId[, string|null $reportTypeCode = '' ]) : string
Parameters
- $reportId : int
- $reportTypeCode : string|null = ''
Tags
Return values
stringgetReportData()
Retrieve report data
public
getReportData(int $reportId) : array<string|int, mixed>
Parameters
- $reportId : int
Return values
array<string|int, mixed>createPdfHtmlTemplate()
Creates HTML with the report data
private
createPdfHtmlTemplate(array<string|int, mixed> $data) : string
Parameters
- $data : array<string|int, mixed>
Tags
Return values
stringsetResourcesPaths()
private
setResourcesPaths(string $companyCode) : void
Parameters
- $companyCode : string