$layoutBuilder
$layoutBuilder : \Charcoal\Ui\Layout\LayoutBuilder
A Generic Form
Concreete implementation of \Charcoal\Ui\Form\FormInterface.
$layoutBuilder : \Charcoal\Ui\Layout\LayoutBuilder
$groups : array<mixed,\Charcoal\Ui\FormGroup\FormGroupInterface>
The form's field groups.
$layout : \Charcoal\Ui\Layout\LayoutInterface
setLayoutBuilder(\Charcoal\Ui\Layout\LayoutBuilder $builder) : \Charcoal\Ui\Layout\DashboardInterface
\Charcoal\Ui\Layout\LayoutBuilder | $builder | The layout builder, to create customized layout object(s). |
Chainable
setLayout(\Charcoal\Ui\Layout\LayoutInterface|array $layout) : \Charcoal\Ui\Layout\DashboardInterface
\Charcoal\Ui\Layout\LayoutInterface|array | $layout | The layout object or structure. |
If the layout argument is not an object or layout structure.
Chainable
layout() : \Charcoal\Ui\Layout\LayoutInterface
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
setActive(boolean $active) : \Charcoal\Ui\AbstractUiItem
Activates/deactivates the UI item.
boolean | $active | Activate (TRUE) or deactivate (FALSE) the UI item. |
Chainable
setType(string|null $type) : \Charcoal\Ui\UiItemInterface
Set the UI item type.
string|null | $type | The UI item type. |
If the type is not a string.
Chainable
setTemplate(string $template) : \Charcoal\Ui\UiItemInterface
Set the UI item's template.
Usually, a path to a file containing the template to be rendered.
string | $template | A template (identifier). |
If the template is not a string.
Chainable
setTitle(mixed $title) : \Charcoal\Ui\UiItemInterface
Set the UI item's title.
mixed | $title | A title. |
Chainable
setSubtitle(mixed $subtitle) : \Charcoal\Ui\UiItemInterface
Set the UI item's sub-title.
mixed | $subtitle | A sub-title. |
Chainable
setDescription(mixed $description) : \Charcoal\Ui\UiItemInterface
Set the UI item's description.
mixed | $description | A description. |
Chainable
setNotes(mixed $notes) : \Charcoal\Ui\UiItemInterface
Set notes about the UI item.
mixed | $notes | Notes. |
Chainable
setShowTitle(boolean $show) : \Charcoal\Ui\UiItemInterface
Show/hide the UI item's title.
boolean | $show | Show (TRUE) or hide (FALSE) the title. |
Chainable
setShowSubtitle(boolean $show) : \Charcoal\Ui\UiItemInterface
Show/hide the UI item's sub-title.
boolean | $show | Show (TRUE) or hide (FALSE) the sub-title. |
Chainable
setShowDescription(boolean $show) : \Charcoal\Ui\UiItemInterface
Show/hide the UI item's description.
boolean | $show | Show (TRUE) or hide (FALSE) the description. |
Chainable
setShowNotes(boolean $show) : \Charcoal\Ui\UiItemInterface
Show/hide the UI item's notes.
boolean | $show | Show (TRUE) or hide (FALSE) the notes. |
Chainable
setShowHeader(boolean $show) : \Charcoal\Ui\UiItemInterface
Show/hide the UI item's header.
boolean | $show | Show (TRUE) or hide (FALSE) the header. |
Chainable
setShowFooter(boolean $show) : \Charcoal\Ui\UiItemInterface
Show/hide the UI item's footer.
boolean | $show | Show (TRUE) or hide (FALSE) the footer. |
Chainable
setIcon(string $icon) : \Charcoal\Ui\UiItemInterface
Set the path to the item's icon associated with the object.
string | $icon | A path to an image. |
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