\HtmlReportFormatter
- Author: marcus@silverstripe.com.au
- License: http://silverstripe.org/bsd-license/
Synopsis
class HtmlReportFormatter
extends ReportFormatter
{
- // Inherited constants from ReportFormatter
- const DEFAULT_TABLE_NAME = '__report_formatter__default__';
- const ADD_IN_ROWS_TOTAL = '__AddInRows_Total';
- // Inherited members from ReportFormatter
- protected array $settings;
- protected AdvancedReport $report;
- protected $headers;
- protected DataObjectSet $dataObjects;
- protected $data;
- // methods
- protected string getOutputFormat()
- protected string createHeader()
- protected string createBody()
- protected string formatReport()
- // Inherited methods from ReportFormatter
- public void __construct()
- public void config()
- public void format()
- protected array getFieldFormatters()
- protected void reformatDataObjects()
- protected void resetPreviousVals()
- protected abstract void getOutputFormat()
- protected abstract void createHeader()
- protected abstract void createBody()
- protected abstract void formatReport()
Hierarchy
Extends
Tasks
Line | Task |
---|---|
128+ | this method is too complex and should be refactored into smaller methods |
Constants
Name | Value |
---|---|
DEFAULT_TABLE_NAME | '__report_formatter__default__' |
ADD_IN_ROWS_TOTAL | '__AddInRows_Total' |
Members
protected
- $data
—
array
The formatted data - $dataObjects
—
DataObjectSet
The raw dataobjects to display - $headers
—
array
The headers. Should be in a format of array( 'Field' => 'Display' ); - $report
—
AdvancedReport
The report we're formatting - $settings
Methods
protected
- createBody() — Create a body for the report
- createHeader() — Create a header for the report
- formatReport() — Format the header and body into a complete report output.
- getOutputFormat()
Inherited from ReportFormatter
protected
- createBody() — Create a body for the report
- createHeader() — Create a header for the report
- formatReport() — Format the header and body into a complete report output.
- getFieldFormatters() — returns a associated array of fields and formatter instances
- getOutputFormat() — Indicate what output format we're going to
- reformatDataObjects() — Restructures the data objects according to the settings of the report.
- resetPreviousVals() — Finds the 'row position' of a given field name in the current report structure