Methods summary
public
Charcoal\Ui\Form\FormInterface
|
#
setFormGroupFactory( Charcoal\Factory\FactoryInterface $factory )
Parameters
- $factory
- A factory, to create customized form gorup objects.
Returns
|
protected
Charcoal\Ui\Form\FormInterface
|
#
formGroupFactory( )
Returns
Throws
Exception If the form group factory object was not set / injected.
|
public
Charcoal\Ui\Form\FormInterface
|
|
public
Charcoal\Ui\Form\FormInterface
|
#
setAction( string $action )
Parameters
- $action
- The "action" value, typically a URL.
Returns
Throws
InvalidArgumentException If the action argument is not a string.
|
public
string
|
|
public
Charcoal\Ui\Form\FormInterface
|
#
setMethod( string $method )
Set the method (forcing lowercase) to "post" or "get".
Set the method (forcing lowercase) to "post" or "get".
Parameters
- $method
- Either "post" or "get".
Returns
Throws
InvalidArgumentException If the method is not post or get.
|
public
string
|
#
method( )
Returns
string Either "post" or "get".
|
public
Charcoal\Ui\Form\FormInterface
|
|
public
string
|
|
public
Charcoal\Ui\Form\FormInterface
|
#
setGroups( array $groups )
Set the object's form groups.
Set the object's form groups.
Parameters
- $groups
- A collection of group structures.
Returns
|
public
Charcoal\Ui\Form\FormInterface
|
#
addGroup( string $groupIdent, array|Charcoal\Ui\FormGroup\FormGroupInterface $group )
Add a form group.
Parameters
- $groupIdent
- The group identifier.
- $group
- The group object or structure.
Returns
Throws
InvalidArgumentException If the identifier is not a string or the group is invalid.
|
protected
Charcoal\Ui\FormGroup\FormGroupInterface
|
#
createFormGroup( array $data = null )
Create a new form group widget.
Create a new form group widget.
Parameters
- $data
- Optional. The form group data to set.
Returns
|
protected
Charcoal\Ui\FormGroup\FormGroupInterface
|
#
updateFormGroup( Charcoal\Ui\FormGroup\FormGroupInterface $group, array $groupData = null, string|null $groupIdent = null )
Update the given form group widget.
Update the given form group widget.
Parameters
- $group
- The form group to update.
- $groupData
- Optional. The new group data to apply.
- $groupIdent
- Optional. The new group identifier.
Returns
|
public
string
|
#
defaultGroupType( )
Retrieve the default form group class name.
Retrieve the default form group class name.
Returns
string
|
public
Charcoal\Ui\FormGroup\FormGroupInterface[] |Generator
|
#
groups( callable $groupCallback = null )
Retrieve the form groups.
Retrieve the form groups.
Parameters
- $groupCallback
- Optional callback applied to each form group.
Returns
|
public
boolean
|
#
hasGroups( )
Determine if the form has any groups.
Determine if the form has any groups.
Returns
boolean
|
public
boolean
|
#
hasGroup( string $groupIdent )
Determine if the form has a given group.
Determine if the form has a given group.
Parameters
- $groupIdent
- The group identifier to look up.
Returns
boolean
Throws
InvalidArgumentException If the group identifier is invalid.
|
public
integer
|
#
numGroups( )
Count the number of form groups.
Count the number of form groups.
Returns
integer
|
public
ObjectFormWidget
|
#
setGroupDisplayMode( string $mode )
Set the widget's content group display mode.
Set the widget's content group display mode.
Currently only supports "tab".
Parameters
- $mode
- Group display mode.
Returns
ObjectFormWidget Chainable.
Throws
InvalidArgumentException If the display mode is not a string.
|
public
string
|
#
groupDisplayMode( )
Retrieve the widget's content group display mode.
Retrieve the widget's content group display mode.
Returns
string Group display mode.
|
public
boolean
|
#
isTabbable( )
Determine if content groups are to be displayed as tabbable panes.
Determine if content groups are to be displayed as tabbable panes.
Returns
boolean
|
public
Charcoal\Ui\Form\FormInterface
|
#
setFormData( array $formData )
Parameters
- $formData
- The (pre-populated) form data, as [$key=>$val] array.
Returns
|
public
Charcoal\Ui\Form\FormInterface
|
#
addFormData( string $key, mixed $val )
Parameters
- $key
- The form data key, or poperty identifier.
- $val
- The form data value, for a given key.
Returns
Throws
InvalidArgumentException If the key argument is not a string.
|
public
array
|
|
protected static
integer
|
|