$display
$display : string|null
How to display the structure properties.
Form Group Structure Property
The form group widget displays a set of form controls based on properties assigned to the widget directly or a proxy structure property.
Example #1 — Structure widget
"properties": {
"extra_data": {
"type": "structure",
"structure_metadata": {
"properties": { … },
"admin": {
"form_groups": { … },
"default_form_group": "…"
}
}
}
},
"widgets": [
{
"title": "Extra Data",
"type": "charcoal/admin/widget/form-group/structure",
"template": "charcoal/admin/widget/form-group/structure",
"storage_property": "extra_data"
}
]
Example #2 — With verbose storage declaration
{@todo Eventually, the form group could support other storage sources such as file-based or a database such as an SQL server.}
{
"title": "Extra Data",
"type": "charcoal/admin/widget/form-group/structure",
"template": "charcoal/admin/widget/form-group/structure",
"storage": {
"type": "property",
"property": "extra_data"
}
}
setData(array $data) : \Charcoal\Admin\Widget\FormGroupWidget
array | $data | Widget data. |
Chainable
setGroupProperties(array $properties) : \Charcoal\Admin\Widget\FormGroupWidget
array | $properties | The group properties. |
Chainable
setPropertiesOptions(array $properties) : \Charcoal\Admin\Widget\FormGroupWidget
array | $properties | The options to customize the group properties. |
Chainable
formProperties() : array<mixed,\Charcoal\Admin\Widget\FormPropertyWidget>|\Generator
Retrieve the object's properties from the form.
If a property data is invalid.
setShowNotes(boolean|string $show) : \Charcoal\Admin\Widget\FormGroupWidget
Show/hide the widget's notes.
boolean|string | $show | Whether to show or hide notes. |
Chainable
setFormGroup(\Charcoal\Ui\FormGroup\FormGroupInterface $formGroup) : \Charcoal\Admin\Widget\FormGroup\StructureFormGroup
Set the form input's parent group.
\Charcoal\Ui\FormGroup\FormGroupInterface | $formGroup | The parent form group object. |
clearFormGroup() : \Charcoal\Admin\Widget\FormGroup\StructureFormGroup
Clear the group's parent group.
setStorageProperty(string|\Charcoal\Property\PropertyInterface $propertyIdent) : \Charcoal\Admin\Widget\FormGroup\StructureFormGroup
Set the form group's storage target.
Must be a property of the form's object model that will receive an associative array of the form group's data.
string|\Charcoal\Property\PropertyInterface | $propertyIdent | The property identifier—or instance—of a storage property. |
If the property identifier is not a string.
If a property data is invalid.