Table
Table implements OutputableInterface, ValidatableInterface
Column
- Full name: \Gibbon\Forms\Layout\Table
- This class implements: Warning: strrchr() expects parameter 1 to be string, object given in /Users/sankuipe/Desktop/Localhost/documentor/src/Extension/TwigMarkdownAnchorLink.php on line 108
Methods
- __construct — Create an element that holds an internal collection of rows and optional header.
- addHeaderRow — Add a header to the internal collection and return the resulting Row object.
- addRow — Add a row to the internal collection and return the resulting object.
- getHeaders — Get all rows defined as headers.
- getElements — Get all rows in the table.
- getOutput — Get the HTML output of the table element. Iterate over headers and rows to build a table.
- addValidation — Dead-end stub for interface: columns cannot validate.
- getValidationOutput — Iterate over each element in the collection and get the combined validation output.
- loadFrom — Pass an array of $key => $value pairs into each element in the collection.
Inherited from BasicAttributesTrait
- setID
- getID
- setTitle
- getTitle
- setClass
- addClass
- removeClass
- getClass
- addData
- getData
- getAttributeString
__construct
Create an element that holds an internal collection of rows and optional header.
Table::__construct( \Gibbon\Forms\FormFactoryInterface $factory, string $id = '' )
addHeaderRow
Add a header to the internal collection and return the resulting Row object.
Table::addHeaderRow( string $id = '' ): object
Return Value:
object
Row
addRow
Add a row to the internal collection and return the resulting object.
Table::addRow( string $id = '' ): object
Return Value:
object
Row
getHeaders
Get all rows defined as headers.
Table::getHeaders( ): array
Return Value:
array
getElements
Get all rows in the table.
Table::getElements( ): array
Return Value:
array
getOutput
Get the HTML output of the table element. Iterate over headers and rows to build a table.
Table::getOutput( ): string
Return Value:
string
addValidation
Dead-end stub for interface: columns cannot validate.
Table::addValidation( string $name ): self
Returns Self: This method can be chained.
getValidationOutput
Iterate over each element in the collection and get the combined validation output.
Table::getValidationOutput( ): string
Return Value:
string
loadFrom
Pass an array of $key => $value pairs into each element in the collection.
Table::loadFrom( &$data ): self
Returns Self: This method can be chained.