Row

Row

Holds a collection of form elements to be output horizontally.

Methods

Inherited from BasicAttributesTrait

__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.


Last updated : September 15, 2018 b92362d