CSFlexHtmlTableRenderer
extends CSFlexTableRenderer
in package
Flex Renderer that converts a Flex Table to HTML
Tags
Table of Contents
- AUTOMERGE_AREAS_DATA = 1
- Defines the data area to be included in automerging of cells.
- AUTOMERGE_AREAS_FOOTER = 4
- Defines the footer area to be included in automerging of cells.
- AUTOMERGE_AREAS_HEADER = 2
- Defines the header area to be included in automerging of cells.
- AUTOMERGE_AREAS_NONE = 0
- Defines the no areas to be included in automerging of cells.
- SECTION_TYPE_BODY = 'body'
- SECTION_TYPE_FOOTER = 'footer'
- SECTION_TYPE_HEADER = 'header'
- VALUE_MATRIX_GROUP_BY_COLUMN = 1
- Defines the col grouping when generating the value matrix for a table.
- VALUE_MATRIX_GROUP_BY_ROW = 0
- Defines the row grouping when generating the value matrix for a table.
- VALUE_MATRIX_GROUP_BY_ROW_COLUMN = 0
- Defines if the operation is only column merging of cells.
- __construct() : mixed
- Instantiates the table renderer
- addFieldsToEditor() : mixed
- This method can be used by CSGuiEditors to add the renderer specific fields to the editor
- getPreset() : CSFlexPreset
- Returns the preset used to render this table
- getTableContainer() : CSFlexTableContainer
- Allows to access the prepared and filled table container
- getTemplatePlugin() : CSFlexTemplatePlugin
- isEmptyRowForValue() : bool
- Checks whether value is empty or not
- renderCellContent() : mixed
- Renders a dedicated table cell identified by the $CellID
- renderTableContainer() : mixed
- Renders the table by calling the necessary methods.
- setHeaderRowsRemoved() : mixed
- Allows to remove the headers for rendering
- setMaxCols() : mixed
- Sets the maximum number of cols
- setMaxRows() : mixed
- Sets the maximum number of rows
- setMergingOfColCellsWithEqualValues() : void
- This method can be used to tell the renderer that cells with equal content in one col should be merged before render the table.
- setMergingOfRowCellsWithEqualValues() : void
- This method can be used to tell the renderer that cells with equal content in one row should be merged before render the table.
- setOrientationInverted() : void
- This method can be used to tell the renderer that the table should invert rows and cols
- setPreset() : void
- Overwrites the internal preset
- setRemovingOfEmptyCols() : void
- This method can be used to tell the renderer that empty cols should be removed before rendering the table.
- setRemovingOfEmptyRows() : void
- This method can be used to tell the renderer that empty rows should be removed before rendering the table. This method only takes data rows into account. Header and footer rows are not modified.
Constants
AUTOMERGE_AREAS_DATA
Defines the data area to be included in automerging of cells.
public
mixed
AUTOMERGE_AREAS_DATA
= 1
Tags
AUTOMERGE_AREAS_FOOTER
Defines the footer area to be included in automerging of cells.
public
mixed
AUTOMERGE_AREAS_FOOTER
= 4
Tags
AUTOMERGE_AREAS_HEADER
Defines the header area to be included in automerging of cells.
public
mixed
AUTOMERGE_AREAS_HEADER
= 2
Tags
AUTOMERGE_AREAS_NONE
Defines the no areas to be included in automerging of cells.
public
mixed
AUTOMERGE_AREAS_NONE
= 0
Tags
SECTION_TYPE_BODY
public
mixed
SECTION_TYPE_BODY
= 'body'
Tags
SECTION_TYPE_FOOTER
public
mixed
SECTION_TYPE_FOOTER
= 'footer'
Tags
SECTION_TYPE_HEADER
public
mixed
SECTION_TYPE_HEADER
= 'header'
Tags
VALUE_MATRIX_GROUP_BY_COLUMN
Defines the col grouping when generating the value matrix for a table.
public
mixed
VALUE_MATRIX_GROUP_BY_COLUMN
= 1
Tags
VALUE_MATRIX_GROUP_BY_ROW
Defines the row grouping when generating the value matrix for a table.
public
mixed
VALUE_MATRIX_GROUP_BY_ROW
= 0
Tags
VALUE_MATRIX_GROUP_BY_ROW_COLUMN
Defines if the operation is only column merging of cells.
public
mixed
VALUE_MATRIX_GROUP_BY_ROW_COLUMN
= 0
Tags
Methods
__construct()
Instantiates the table renderer
public
final __construct(CSFlexTableContainer $container, CSFlexPreset $preset) : mixed
Parameters
- $container : CSFlexTableContainer
-
the filled container
- $preset : CSFlexPreset
-
the preset to render with later
Tags
Return values
mixed —addFieldsToEditor()
This method can be used by CSGuiEditors to add the renderer specific fields to the editor
public
addFieldsToEditor(CSGuiEditor $editor) : mixed
Parameters
- $editor : CSGuiEditor
-
the CSGuiEditor or descendant
Tags
Return values
mixed —getPreset()
Returns the preset used to render this table
public
final getPreset() : CSFlexPreset
Tags
Return values
CSFlexPreset —The flex preset
getTableContainer()
Allows to access the prepared and filled table container
public
final getTableContainer() : CSFlexTableContainer
Tags
Return values
CSFlexTableContainer —getTemplatePlugin()
public
final getTemplatePlugin() : CSFlexTemplatePlugin
Tags
Return values
CSFlexTemplatePlugin —the template plugin
isEmptyRowForValue()
Checks whether value is empty or not
public
isEmptyRowForValue(string $sValue) : bool
Parameters
- $sValue : string
-
string to check either empty or not
Tags
Return values
bool —renderCellContent()
Renders a dedicated table cell identified by the $CellID
public
final renderCellContent(CSFlexTableCellContent $oContent) : mixed
Parameters
- $oContent : CSFlexTableCellContent
-
the content object
Tags
Return values
mixed —The rendered cell content object
renderTableContainer()
Renders the table by calling the necessary methods.
public
final renderTableContainer() : mixed
Tags
Return values
mixed —The rendered table.
setHeaderRowsRemoved()
Allows to remove the headers for rendering
public
setHeaderRowsRemoved([mixed $headerRowsRemoved = true ]) : mixed
Parameters
- $headerRowsRemoved : mixed = true
Tags
Return values
mixed —setMaxCols()
Sets the maximum number of cols
public
setMaxCols(int $maxCols) : mixed
Parameters
- $maxCols : int
Tags
Return values
mixed —setMaxRows()
Sets the maximum number of rows
public
setMaxRows(int $maxRows) : mixed
Parameters
- $maxRows : int
Tags
Return values
mixed —setMergingOfColCellsWithEqualValues()
This method can be used to tell the renderer that cells with equal content in one col should be merged before render the table.
public
setMergingOfColCellsWithEqualValues([bool $bMerge = true ]) : void
Parameters
- $bMerge : bool = true
-
If set to true, cells with equal content are merged before rendering the table.
Tags
Return values
void —setMergingOfRowCellsWithEqualValues()
This method can be used to tell the renderer that cells with equal content in one row should be merged before render the table.
public
setMergingOfRowCellsWithEqualValues([int $iMerge = 7 ]) : void
Parameters
- $iMerge : int = 7
-
Defines which areas in the table should be included in automerging of equal cells. The following BIT operators can be used:
AUTOMERGE_AREAS_NONE: No areas are automerged. AUTOMERGE_AREAS_HEADER: The header area should be included in the automerge. AUTOMERGE_AREAS_DATA: The data area should be included in the automerge. AUTOMERGE_AREAS_FOOTER: The footer area should be included in the automerge.
Tags
Return values
void —setOrientationInverted()
This method can be used to tell the renderer that the table should invert rows and cols
public
setOrientationInverted([bool $bInverted = true ]) : void
Parameters
- $bInverted : bool = true
-
If set to true, the rows and cols are inverted
Tags
Return values
void —setPreset()
Overwrites the internal preset
public
final setPreset(CSFlexPreset $preset) : void
Parameters
- $preset : CSFlexPreset
Tags
Return values
void —setRemovingOfEmptyCols()
This method can be used to tell the renderer that empty cols should be removed before rendering the table.
public
setRemovingOfEmptyCols([bool $bRemove = true ]) : void
Parameters
- $bRemove : bool = true
-
If set to true, empty cols are removed from the rendered table.
Tags
Return values
void —setRemovingOfEmptyRows()
This method can be used to tell the renderer that empty rows should be removed before rendering the table. This method only takes data rows into account. Header and footer rows are not modified.
public
setRemovingOfEmptyRows([bool $bRemove = true ]) : void
Parameters
- $bRemove : bool = true
-
If set to true, empty rows are removed from the rendered table.
