Row
Row
Holds a collection of form elements to be output horizontally.
- Full name: \Gibbon\Forms\Layout\Row
Methods
- __construct — Construct a row with access to a specific factory.
- __call — Invoke factory method for creating elements when an “add” method is called on this row.
- onlyIf — Allows a conditional to be chained into the form row elements, rather than wrapping the whole section in an if statement.
- addElement — Adds an outputtable element to the row’s internal collection.
- getElement — Get a row element by ID
- getElements — Get an array of all row elements.
- getElementCount — Count the elements array.
- isLastElement — Determine of the supplied Eelement object is the last element in the collection.
- loadFrom — Pass an array of $key => $value pairs into each element in the collection.
- loadState — Load the state of several fields at once by calling $method on each element present in $data by key, passing in the value of $data.
Inherited from BasicAttributesTrait
- setID
- getID
- setTitle
- getTitle
- setClass
- addClass
- removeClass
- getClass
- addData
- getData
- getAttributeString
__construct
Construct a row with access to a specific factory.
Row::__construct( \Gibbon\Forms\FormFactoryInterface $factory, string $id = '' )
__call
Invoke factory method for creating elements when an “add” method is called on this row.
Row::__call( string $function, array $args ): object
Return Value:
object
Element
onlyIf
Allows a conditional to be chained into the form row elements, rather than wrapping the whole section in an if statement.
Row::onlyIf( boolean $conditional ): object
Return Value:
object
OutputableInterface
addElement
Adds an outputtable element to the row’s internal collection.
Row::addElement( \Gibbon\Forms\OutputableInterface $element )
getElement
Get a row element by ID
Row::getElement( string $id = '' ): object
Return Value:
object
Element
getElements
Get an array of all row elements.
Row::getElements( ): array
Return Value:
array
getElementCount
Count the elements array.
Row::getElementCount( ): integer
Return Value:
integer
isLastElement
Determine of the supplied Eelement object is the last element in the collection.
Row::isLastElement( object $element ): boolean
Return Value:
boolean
loadFrom
Pass an array of $key => $value pairs into each element in the collection.
Row::loadFrom( &$data ): self
Returns Self: This method can be chained.
loadState
Load the state of several fields at once by calling $method on each element present in $data by key, passing in the value of $data.
Row::loadState( string $method, array &$data, $extract = true ): self
Returns Self: This method can be chained.