TYPO3  7.6
Public Member Functions | Public Attributes | Private Attributes | List of all members
TableHelper Class Reference
Inheritance diagram for TableHelper:
Helper HelperInterface

Public Member Functions

 __construct ($triggerDeprecationError=true)
 
 setLayout ($layout)
 
 setHeaders (array $headers)
 
 setRows (array $rows)
 
 addRows (array $rows)
 
 addRow (array $row)
 
 setRow ($column, array $row)
 
 setPaddingChar ($paddingChar)
 
 setHorizontalBorderChar ($horizontalBorderChar)
 
 setVerticalBorderChar ($verticalBorderChar)
 
 setCrossingChar ($crossingChar)
 
 setCellHeaderFormat ($cellHeaderFormat)
 
 setCellRowFormat ($cellRowFormat)
 
 setCellRowContentFormat ($cellRowContentFormat)
 
 setBorderFormat ($borderFormat)
 
 setPadType ($padType)
 
 render (OutputInterface $output)
 
 getName ()
 
- Public Member Functions inherited from Helper
 setHelperSet (HelperSet $helperSet=null)
 
 getHelperSet ()
 

Public Attributes

const LAYOUT_DEFAULT = 0
 
const LAYOUT_BORDERLESS = 1
 
const LAYOUT_COMPACT = 2
 

Private Attributes

 $table
 

Additional Inherited Members

- Static Public Member Functions inherited from Helper
static strlen ($string)
 
static formatTime ($secs)
 
static formatMemory ($memory)
 
static strlenWithoutDecoration (OutputFormatterInterface $formatter, $string)
 
- Protected Attributes inherited from Helper
 $helperSet = null
 

Detailed Description

Provides helpers to display table output.

Author
Саша Стаменковић umpir.nosp@m.sky@.nosp@m.gmail.nosp@m..com
Fabien Potencier fabie.nosp@m.n@sy.nosp@m.mfony.nosp@m..com
Deprecated:
since version 2.5, to be removed in 3.0 Use Table instead.

Definition at line 26 of file TableHelper.php.

Constructor & Destructor Documentation

__construct (   $triggerDeprecationError = true)

Definition at line 37 of file TableHelper.php.

Member Function Documentation

addRow ( array  $row)

Definition at line 98 of file TableHelper.php.

addRows ( array  $rows)

Definition at line 91 of file TableHelper.php.

getName ( )

{Returns the canonical name of this helper.

Returns
string The canonical name
}

Implements HelperInterface.

Definition at line 264 of file TableHelper.php.

render ( OutputInterface  $output)

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 | +------------—+--------------------—+---------------—+

Parameters
OutputInterface$output

Definition at line 252 of file TableHelper.php.

setBorderFormat (   $borderFormat)

Sets table border format.

Parameters
string$borderFormat
Returns
TableHelper

Definition at line 217 of file TableHelper.php.

setCellHeaderFormat (   $cellHeaderFormat)

Sets header cell format.

Parameters
string$cellHeaderFormat
Returns
TableHelper

Definition at line 175 of file TableHelper.php.

setCellRowContentFormat (   $cellRowContentFormat)

Sets row cell content format.

Parameters
string$cellRowContentFormat
Returns
TableHelper

Definition at line 203 of file TableHelper.php.

setCellRowFormat (   $cellRowFormat)

Sets row cell format.

Parameters
string$cellRowFormat
Returns
TableHelper

Definition at line 189 of file TableHelper.php.

setCrossingChar (   $crossingChar)

Sets crossing character.

Parameters
string$crossingChar
Returns
TableHelper

Definition at line 161 of file TableHelper.php.

setHeaders ( array  $headers)

Definition at line 77 of file TableHelper.php.

setHorizontalBorderChar (   $horizontalBorderChar)

Sets horizontal border character.

Parameters
string$horizontalBorderChar
Returns
TableHelper

Definition at line 133 of file TableHelper.php.

setLayout (   $layout)

Sets table layout type.

Parameters
int$layoutself::LAYOUT_*
Returns
TableHelper
Exceptions
\InvalidArgumentExceptionwhen the table layout is not known

Definition at line 55 of file TableHelper.php.

setPaddingChar (   $paddingChar)

Sets padding character, used for cell padding.

Parameters
string$paddingChar
Returns
TableHelper

Definition at line 119 of file TableHelper.php.

setPadType (   $padType)

Sets cell padding type.

Parameters
int$padTypeSTR_PAD_*
Returns
TableHelper

Definition at line 231 of file TableHelper.php.

setRow (   $column,
array  $row 
)

Definition at line 105 of file TableHelper.php.

setRows ( array  $rows)

Definition at line 84 of file TableHelper.php.

setVerticalBorderChar (   $verticalBorderChar)

Sets vertical border character.

Parameters
string$verticalBorderChar
Returns
TableHelper

Definition at line 147 of file TableHelper.php.

Member Data Documentation

$table
private

Definition at line 35 of file TableHelper.php.

const LAYOUT_BORDERLESS = 1

Definition at line 29 of file TableHelper.php.

Referenced by LegacyTableHelperTest\testRenderProvider().

const LAYOUT_COMPACT = 2

Definition at line 30 of file TableHelper.php.

Referenced by LegacyTableHelperTest\testRenderProvider().

const LAYOUT_DEFAULT = 0