![]() |
TYPO3
7.6
|
Public Member Functions | |
__construct (OutputInterface $output) | |
setStyle ($name) | |
getStyle () | |
setHeaders (array $headers) | |
setRows (array $rows) | |
addRows (array $rows) | |
addRow ($row) | |
setRow ($column, array $row) | |
render () | |
Static Public Member Functions | |
static | setStyleDefinition ($name, TableStyle $style) |
static | getStyleDefinition ($name) |
Private Member Functions | |
renderRowSeparator () | |
renderColumnSeparator () | |
renderRow (array $row, $cellFormat) | |
renderCell (array $row, $column, $cellFormat) | |
calculateNumberOfColumns () | |
buildTableRows ($rows) | |
fillNextRows ($rows, $line) | |
fillCells ($row, $column) | |
copyRow ($rows, $line) | |
getNumberOfColumns (array $row) | |
getRowColumns ($row) | |
getColumnWidth ($column) | |
getColumnSeparatorWidth () | |
getCellWidth (array $row, $column) | |
cleanup () | |
Static Private Member Functions | |
static | initStyles () |
Private Attributes | |
$headers = array() | |
$rows = array() | |
$columnWidths = array() | |
$numberOfColumns | |
$output | |
$style | |
Static Private Attributes | |
static | $styles |
__construct | ( | OutputInterface | $output | ) |
Definition at line 65 of file Table.php.
References Table\$output, and Table\setStyle().
addRow | ( | $row | ) |
Definition at line 169 of file Table.php.
Referenced by Table\addRows().
addRows | ( | array | $rows | ) |
|
private |
Definition at line 338 of file Table.php.
References Table\$rows, Table\fillCells(), and Table\fillNextRows().
Referenced by Table\render().
|
private |
Calculate number of columns for this table.
Definition at line 320 of file Table.php.
References Table\getNumberOfColumns().
Referenced by Table\render().
|
private |
Called after rendering to cleanup cache data.
Definition at line 568 of file Table.php.
Referenced by Table\render().
|
private |
array | $rows | |
int | $line |
Definition at line 455 of file Table.php.
References Table\$rows.
Referenced by Table\fillNextRows().
|
private |
fill cells for a row that contains colspan > 1.
array | $row | |
array | $column |
Definition at line 436 of file Table.php.
References TableCell\getColspan().
Referenced by Table\buildTableRows().
|
private |
fill rows that contains rowspan > 1.
array | $rows | |
array | $line |
Definition at line 383 of file Table.php.
References Table\$rows, Table\copyRow(), Table\getNumberOfColumns(), and TableCell\getRowspan().
Referenced by Table\buildTableRows().
|
private |
Gets cell width.
array | $row | |
int | $column |
Definition at line 549 of file Table.php.
References TableCell\getColspan(), and Helper\strlenWithoutDecoration().
Referenced by Table\getColumnWidth().
|
private |
Gets column width.
int | $column |
Definition at line 536 of file Table.php.
Referenced by Table\renderCell().
|
private |
Gets column width.
int | $column |
Definition at line 512 of file Table.php.
References Table\getCellWidth().
Referenced by Table\renderCell(), and Table\renderRowSeparator().
|
private |
Gets number of columns by row.
array | $row |
Definition at line 475 of file Table.php.
Referenced by Table\calculateNumberOfColumns(), and Table\fillNextRows().
|
private |
Gets list of columns for the given row.
array | $row |
Definition at line 492 of file Table.php.
References TableCell\getColspan().
Referenced by Table\renderRow().
getStyle | ( | ) |
Gets the current table style.
Definition at line 136 of file Table.php.
References Table\$style.
|
static |
Gets a style definition by name.
string | $name | The style name |
render | ( | ) |
Renders table to output.
Example: +------------—+--------------------—+---------------—+ | ISBN | Title | Author | +------------—+--------------------—+---------------—+ | 99921-58-10-7 | Divine Comedy | Dante Alighieri | | 9971-5-0210-0 | A Tale of Two Cities | Charles Dickens | | 960-425-059-0 | The Lord of the Rings | J. R. R. Tolkien | +------------—+--------------------—+---------------—+
Definition at line 205 of file Table.php.
References Table\buildTableRows(), Table\calculateNumberOfColumns(), Table\cleanup(), Table\renderRow(), and Table\renderRowSeparator().
|
private |
Renders table cell with padding.
array | $row | |
int | $column | |
string | $cellFormat |
Definition at line 292 of file Table.php.
References TableCell\getColspan(), Table\getColumnSeparatorWidth(), Table\getColumnWidth(), Helper\strlen(), and Helper\strlenWithoutDecoration().
Referenced by Table\renderRow().
|
private |
Renders vertical column separator.
Definition at line 258 of file Table.php.
Referenced by Table\renderRow().
|
private |
Renders table row.
Example: | 9971-5-0210-0 | A Tale of Two Cities | Charles Dickens |
array | $row | |
string | $cellFormat |
Definition at line 271 of file Table.php.
References Table\getRowColumns(), Table\renderCell(), and Table\renderColumnSeparator().
Referenced by Table\render().
|
private |
Renders horizontal header separator.
Example: +--—+--------—+----—+
Definition at line 237 of file Table.php.
References Table\getColumnWidth().
Referenced by Table\render().
setHeaders | ( | array | $headers | ) |
Definition at line 141 of file Table.php.
References Table\$headers.
setRows | ( | array | $rows | ) |
Definition at line 153 of file Table.php.
References Table\addRows().
setStyle | ( | $name | ) |
Sets table style.
TableStyle | string | $name | The style name or a TableStyle instance |
Definition at line 118 of file Table.php.
References elseif.
Referenced by Table\__construct().
|
static |
Sets a style definition.
string | $name | The style name |
TableStyle | $style | A TableStyle instance |
Definition at line 82 of file Table.php.
References Table\$style.
Referenced by TableTest\testStyle().
|
private |
Definition at line 30 of file Table.php.
Referenced by Table\setHeaders().
|
private |
Definition at line 56 of file Table.php.
Referenced by Table\__construct().
|
private |
Definition at line 37 of file Table.php.
Referenced by Table\buildTableRows(), Table\copyRow(), and Table\fillNextRows().
|
private |
Definition at line 61 of file Table.php.
Referenced by Table\getStyle(), and Table\setStyleDefinition().