CoolCMS API

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

addTranslationFields()

Multilingual fields: one set per language (`name_<langId>`, `description_<langId>`), active per checkbox.

private addTranslationFields(Form $form) : void
Parameters
$form : Form

saveProductStateForm()

private saveProductStateForm(ArrayHash<string|int, mixed> $values) : bool
Parameters
$values : ArrayHash<string|int, mixed>
Return values
bool
On this page

Search results