CoolCMS API

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

addTranslationFields()

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
Guestbook

saveGuestbookForm()

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

Search results