GuestbookFormTrait
Edit/add form of a guestbook, a purely multilingual entity (translated `name` plus active-translation flag).
The comment thread is created by the Api manager on save (GuestbookManager). Modeled on TagFormTrait. The skeleton comes from BasePresenter::createForm().
Table of Contents
Methods
- createComponentEditForm() : Form
- addTranslationFields() : void
- Multilingual fields: one set per language (`name_<langId>`), active according to the checkbox.
- buildGuestbookEntity() : Guestbook
- saveGuestbookForm() : bool
- setGuestbookFormDefaults() : void
Methods
createComponentEditForm()
protected
createComponentEditForm() : Form
Return values
FormaddTranslationFields()
Multilingual fields: one set per language (`name_<langId>`), active according to the checkbox.
private
addTranslationFields(Form $form) : void
Parameters
- $form : Form
buildGuestbookEntity()
private
buildGuestbookEntity(ArrayHash<string|int, mixed> $values) : Guestbook
Parameters
- $values : ArrayHash<string|int, mixed>
Return values
GuestbooksaveGuestbookForm()
private
saveGuestbookForm(ArrayHash<string|int, mixed> $values) : bool
Parameters
- $values : ArrayHash<string|int, mixed>
Return values
boolsetGuestbookFormDefaults()
private
setGuestbookFormDefaults(Form $form) : void
Parameters
- $form : Form