CSFlexTable
extends CSFlexObject
in package
Represents a Flex Table
The Flex Table is the pure data container for the tabular data provided by a Flex Template Plugin
Tags
Table of Contents
- ROW_TYPE_DATA = 2
- Defines the row type for data rows.
- ROW_TYPE_FOOTER = 3
- Defines the row type for footer rows.
- ROW_TYPE_HEADER = 1
- Defines the row type for header rows.
- __clone() : mixed
- Internal method to clone a table.
- addCol() : CSFlexTableCol
- Adds a column to the table.
- addCols() : array<string|int, mixed>
- Adds multiple columns to the table.
- addFooterRow() : CSFlexTableRow
- Adds a footer row to the table.
- addHeaderRow() : CSFlexTableRow
- Adds a header row to the table.
- addRow() : CSFlexTableRow
- Adds a body row to the table.
- addRows() : array<string|int, mixed>
- Adds multiple body rows to the table.
- clear() : void
- Clears the flex table data.
- getColAtIndex() : CSFlexTableCol
- Returns the object for the column at the specified index.
- getCols() : array<string|int, mixed>
- Returns all the columns for the table.
- getFooterRowAtIndex() : CSFlexTableRow
- Returns the footer row at the specified index.
- getFooterRows() : array<string|int, mixed>
- Returns all footer rows of the table.
- getHeaderRowAtIndex() : CSFlexTableRow
- Returns the header row at the specified index.
- getHeaderRows() : array<string|int, CSFlexTableRow>
- Returns all header rows of the table.
- getInvertedTable() : CSFlexTable
- Inverts the current table and returns a new table object with the inverted data. Please be aware that header/footer rows are added now as simple cols and cannot be accessed via the getHeader.../getFooter... APIs any more.
- getNumberOfCols() : mixed
- Returns the number of cols in the table.
- getNumberOfFooterRows() : int
- Returns the number of footer rows contained in the table.
- getNumberOfHeaderRows() : int
- Returns the number of header rows contained in the table.
- getNumberOfRows() : int
- Returns the number of body rows contained in the table.
- getRowAtIndex() : CSFlexTableRow
- Returns the body row at the specified index.
- getRowFromPathIdentifier() : CSFlexTableRow
- Returns a row based on the path identifier. The path itself must be build in the following way:
- getRows() : array<string|int, CSFlexTableRow>
- Returns all body rows of the table.
- getStyleName() : string
- Gets the style name of the table.
- insertRowAtIndex() : CSFlexTableRow
- Inserts a body row to the table at a specified index.
- insertRowsAtIndex() : array<string|int, mixed>
- Inserts multiple body rows to the table at a specified index.
- removeColAtIndex() : mixed
- Removes the column at the specified index.
- removeFooterRowAtIndex() : void
- Removes the footer row at the specified index.
- removeHeaderRowAtIndex() : void
- Removes the header row at the specified index.
- removeRowAtIndex() : void
- Removes the row at the specified index.
- setStyleName() : void
- Sets the style name of the table.
Constants
ROW_TYPE_DATA
Defines the row type for data rows.
public
mixed
ROW_TYPE_DATA
= 2
Tags
ROW_TYPE_FOOTER
Defines the row type for footer rows.
public
mixed
ROW_TYPE_FOOTER
= 3
Tags
ROW_TYPE_HEADER
Defines the row type for header rows.
public
mixed
ROW_TYPE_HEADER
= 1
Tags
Methods
__clone()
Internal method to clone a table.
public
__clone() : mixed
Tags
Return values
mixed —addCol()
Adds a column to the table.
public
addCol() : CSFlexTableCol
Tags
Return values
CSFlexTableCol —The object of the column that was added.
addCols()
Adds multiple columns to the table.
public
addCols(mixed $iColCount) : array<string|int, mixed>
Parameters
- $iColCount : mixed
Tags
Return values
array<string|int, mixed> —The objects of the columns that were added.
addFooterRow()
Adds a footer row to the table.
public
addFooterRow() : CSFlexTableRow
Tags
Return values
CSFlexTableRow —The newly added table row object.
addHeaderRow()
Adds a header row to the table.
public
addHeaderRow() : CSFlexTableRow
Tags
Return values
CSFlexTableRow —The newly added table row object.
addRow()
Adds a body row to the table.
public
addRow() : CSFlexTableRow
Tags
Return values
CSFlexTableRow —The newly added table row object.
addRows()
Adds multiple body rows to the table.
public
addRows([mixed $iRowCount = 1 ]) : array<string|int, mixed>
Parameters
- $iRowCount : mixed = 1
Tags
Return values
array<string|int, mixed> —The newly added table row objects as array.
clear()
Clears the flex table data.
public
clear() : void
Tags
Return values
void —getColAtIndex()
Returns the object for the column at the specified index.
public
getColAtIndex(int $iIndex) : CSFlexTableCol
Parameters
- $iIndex : int
-
The index of the column for which the object should be returned.
Tags
Return values
CSFlexTableCol —The column object at the specified index.
getCols()
Returns all the columns for the table.
public
getCols() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed> —List of columns assigned to the table.
getFooterRowAtIndex()
Returns the footer row at the specified index.
public
getFooterRowAtIndex(mixed $iIndex) : CSFlexTableRow
Parameters
- $iIndex : mixed
Tags
Return values
CSFlexTableRow —The row object of the row as a specified index.
getFooterRows()
Returns all footer rows of the table.
public
getFooterRows() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed> —List of all footer rows as array.
getHeaderRowAtIndex()
Returns the header row at the specified index.
public
getHeaderRowAtIndex(mixed $iIndex) : CSFlexTableRow
Parameters
- $iIndex : mixed
Tags
Return values
CSFlexTableRow —The row object of the row as a specified index.
getHeaderRows()
Returns all header rows of the table.
public
getHeaderRows() : array<string|int, CSFlexTableRow>
Tags
Return values
array<string|int, CSFlexTableRow> —List of all header rows as array.
getInvertedTable()
Inverts the current table and returns a new table object with the inverted data. Please be aware that header/footer rows are added now as simple cols and cannot be accessed via the getHeader.../getFooter... APIs any more.
public
getInvertedTable() : CSFlexTable
Tags
Return values
CSFlexTable —A new table object with the inverted data.
getNumberOfCols()
Returns the number of cols in the table.
public
getNumberOfCols() : mixed
Tags
Return values
mixed —getNumberOfFooterRows()
Returns the number of footer rows contained in the table.
public
getNumberOfFooterRows() : int
Tags
Return values
int —The number of footer rows in the table.
getNumberOfHeaderRows()
Returns the number of header rows contained in the table.
public
getNumberOfHeaderRows() : int
Tags
Return values
int —The number of header rows in the table.
getNumberOfRows()
Returns the number of body rows contained in the table.
public
getNumberOfRows() : int
Tags
Return values
int —The number of body rows in the table.
getRowAtIndex()
Returns the body row at the specified index.
public
getRowAtIndex(mixed $iIndex) : CSFlexTableRow
Parameters
- $iIndex : mixed
Tags
Return values
CSFlexTableRow —The row object of the row as a specified index.
getRowFromPathIdentifier()
Returns a row based on the path identifier. The path itself must be build in the following way:
public
getRowFromPathIdentifier(string $sPathIdentifier) : CSFlexTableRow
d:0[:0:0]
where the chunks separated by the ':' are defined as follows:
d: The type of the row to return (d: data, h: header, f: footer) 0: The row index relative to the parent table 0: optional, the cell index relative to the parent row 0: optional, the cell content index relative to the parent cell.
Parameters
- $sPathIdentifier : string
-
The path indentifier of the requested row.
Tags
Return values
CSFlexTableRow —The row matching the path identifier.
getRows()
Returns all body rows of the table.
public
getRows() : array<string|int, CSFlexTableRow>
Tags
Return values
array<string|int, CSFlexTableRow> —list of all body rows as array.
getStyleName()
Gets the style name of the table.
public
getStyleName() : string
Tags
Return values
string —The style name of the table.
insertRowAtIndex()
Inserts a body row to the table at a specified index.
public
insertRowAtIndex(int $iIndex) : CSFlexTableRow
Parameters
- $iIndex : int
-
The index where the new row should be put, relative to the already existing body rows.
Tags
Return values
CSFlexTableRow —The newly added table row object.
insertRowsAtIndex()
Inserts multiple body rows to the table at a specified index.
public
insertRowsAtIndex(int $iIndex[, mixed $iRowCount = 1 ]) : array<string|int, mixed>
Parameters
- $iIndex : int
-
The index where the new rows should be put, relative to the already existing body rows.
- $iRowCount : mixed = 1
Tags
Return values
array<string|int, mixed> —The newly added table row objects as array.
removeColAtIndex()
Removes the column at the specified index.
public
removeColAtIndex(int $iIndex) : mixed
Parameters
- $iIndex : int
-
THe index of the column that should be removed. return void
Tags
Return values
mixed —removeFooterRowAtIndex()
Removes the footer row at the specified index.
public
removeFooterRowAtIndex(int $iIndex) : void
Parameters
- $iIndex : int
-
The index of the row that should be removed.
Tags
Return values
void —removeHeaderRowAtIndex()
Removes the header row at the specified index.
public
removeHeaderRowAtIndex(int $iIndex) : void
Parameters
- $iIndex : int
-
The index of the row that should be removed.
Tags
Return values
void —removeRowAtIndex()
Removes the row at the specified index.
public
removeRowAtIndex(int $iIndex) : void
Parameters
- $iIndex : int
-
The index of the row that should be removed.
Tags
Return values
void —setStyleName()
Sets the style name of the table.
public
setStyleName(mixed $sStyleName) : void
Parameters
- $sStyleName : mixed
