Grid
Grid implements OutputableInterface, ValidatableInterface
Grid
- Full name: \Gibbon\Forms\Layout\Grid
- 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 displays a collection of elements in a flexible grid,
- setColumns — Sets the number of columns wide to render the grid.
- addCell — Add a cell to the internal collection and return the resulting object.
- getElements — Get all cells in the grid.
- getOutput — Get the HTML output of the element. Iterate over elements to build a grid.
- addValidation — Dead-end stub for interface: grids 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 displays a collection of elements in a flexible grid,
Grid::__construct( \Gibbon\Forms\FormFactoryInterface $factory, string $id = '', $columns = 1 )
setColumns
Sets the number of columns wide to render the grid.
Grid::setColumns( integer $columns ): self
Returns Self: This method can be chained.
addCell
Add a cell to the internal collection and return the resulting object.
Grid::addCell( string $id = '' ): object
Return Value:
object
Column
getElements
Get all cells in the grid.
Grid::getElements( ): array
Return Value:
array
getOutput
Get the HTML output of the element. Iterate over elements to build a grid.
Grid::getOutput( ): string
Return Value:
string
addValidation
Dead-end stub for interface: grids cannot validate.
Grid::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.
Grid::getValidationOutput( ): string
Return Value:
string
loadFrom
Pass an array of $key => $value pairs into each element in the collection.
Grid::loadFrom( &$data ): self
Returns Self: This method can be chained.