ProductStateFormTrait
Edit/add form of a product state: a multilingual entity (translated `name` + optional `description` + active-translation flag). The skeleton (check, domain translator, save/update/cancel buttons and return) comes from {@see \App\Core\Base\Admin\BasePresenter::createForm()}.
Table of Contents
Methods
- createComponentEditForm() : Form
- addTranslationFields() : void
- Multilingual fields: one set per language (`name_<langId>`, `description_<langId>`), active per checkbox.
- buildProductStateEntity() : ProductState
- saveProductStateForm() : bool
- setProductStateFormDefaults() : void
Methods
createComponentEditForm()
protected
createComponentEditForm() : Form
Return values
FormaddTranslationFields()
Multilingual fields: one set per language (`name_<langId>`, `description_<langId>`), active per checkbox.
private
addTranslationFields(Form $form) : void
Parameters
- $form : Form
buildProductStateEntity()
private
buildProductStateEntity(ArrayHash<string|int, mixed> $values) : ProductState
Parameters
- $values : ArrayHash<string|int, mixed>
Return values
ProductStatesaveProductStateForm()
private
saveProductStateForm(ArrayHash<string|int, mixed> $values) : bool
Parameters
- $values : ArrayHash<string|int, mixed>
Return values
boolsetProductStateFormDefaults()
private
setProductStateFormDefaults(Form $form) : void
Parameters
- $form : Form