$groupDisplayMode
$groupDisplayMode : string
The form's display mode for groups.
Provides an implementation of {@see FormInterface}.
$groups : array<mixed,\Charcoal\Ui\FormGroup\FormGroupInterface>
The form's field groups.
setFormGroupFactory(\Charcoal\Factory\FactoryInterface $factory) : \Charcoal\Ui\Form\FormInterface
\Charcoal\Factory\FactoryInterface | $factory | A factory, to create customized form gorup objects. |
Chainable
setGroupCallback(callable $cb) : \Charcoal\Ui\Form\FormInterface
callable | $cb | The group callback. |
Chainable
setAction(string $action) : \Charcoal\Ui\Form\FormInterface
string | $action | The "action" value, typically a URL. |
If the action argument is not a string.
Chainable
setMethod(string $method) : \Charcoal\Ui\Form\FormInterface
Set the method (forcing lowercase) to "post" or "get".
string | $method | Either "post" or "get". |
If the method is not post or get.
Chainable
setL10nMode(string $mode) : \Charcoal\Ui\Form\FormInterface
string | $mode | The l10n mode. |
Chainable
setGroups(array $groups) : \Charcoal\Ui\Form\FormInterface
Set the object's form groups.
array | $groups | A collection of group structures. |
Chainable
addGroup(string $groupIdent, array|\Charcoal\Ui\FormGroup\FormGroupInterface $group) : \Charcoal\Ui\Form\FormInterface
Add a form group.
string | $groupIdent | The group identifier. |
array|\Charcoal\Ui\FormGroup\FormGroupInterface | $group | The group object or structure. |
If the identifier is not a string or the group is invalid.
Chainable
groups(callable $groupCallback = null) : array<mixed,\Charcoal\Ui\FormGroup\FormGroupInterface>|\Charcoal\Ui\Form\Generator
Retrieve the form groups.
callable | $groupCallback | Optional callback applied to each form group. |
setGroupDisplayMode(string $mode) : \Charcoal\Ui\Form\ObjectFormWidget
Set the widget's content group display mode.
Currently only supports "tab".
string | $mode | Group display mode. |
If the display mode is not a string.
Chainable.
setFormData(array $formData) : \Charcoal\Ui\Form\FormInterface
array | $formData | The (pre-populated) form data, as [$key=>$val] array. |
Chainable
addFormData(string $key, mixed $val) : \Charcoal\Ui\Form\FormInterface
string | $key | The form data key, or poperty identifier. |
mixed | $val | The form data value, for a given key. |
If the key argument is not a string.
Chainable
formGroupFactory() : \Charcoal\Ui\Form\FormInterface
If the form group factory object was not set / injected.
Chainable
createFormGroup(array|null $data = null) : \Charcoal\Ui\FormGroup\FormGroupInterface
Create a new form group widget.
array|null | $data | Optional. The form group data to set. |
updateFormGroup(\Charcoal\Ui\FormGroup\FormGroupInterface $group, array|null $groupData = null, string|null $groupIdent = null) : \Charcoal\Ui\FormGroup\FormGroupInterface
Update the given form group widget.
\Charcoal\Ui\FormGroup\FormGroupInterface | $group | The form group to update. |
array|null | $groupData | Optional. The new group data to apply. |
string|null | $groupIdent | Optional. The new group identifier. |
sortGroupsByPriority(\Charcoal\Ui\FormGroup\FormGroupInterface $a, \Charcoal\Ui\FormGroup\FormGroupInterface $b) : integer
Static comparison function used by {@see uasort()}.
\Charcoal\Ui\FormGroup\FormGroupInterface | $a | Form Group A. |
\Charcoal\Ui\FormGroup\FormGroupInterface | $b | Form Group B. |
Sorting value: -1 or 1