Documentation

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

$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

exportPdf()

Creates report pdf

public exportPdf(int $reportId[, string|null $reportTypeCode = '' ]) : string
Parameters
$reportId : int
$reportTypeCode : string|null = ''
Tags
throws
Throwable
throws
Exception
Return values
string

getReportData()

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
throws
Throwable
Return values
string

setResourcesPaths()

private setResourcesPaths(string $companyCode) : void
Parameters
$companyCode : string
Tags
throws
Exception

        
On this page

Search results