CoolCMS API

ReservationFormTrait

Supplement to the otherwise read-only reservation detail: the only editable field is `subject` (optional; the client may leave it empty and the manager can add or fix it later).

IMPORTANT: the generic ReservationManager::save() is used on purpose, not updateByAdmin(). That one is reserved for the slot modal (name/e-mail/phone/note/state under the daily lock); widening its signature for one extra field would risk silently nulling subject in SlotModal calls that do not know it. subject is not in ReservationManager::$defaultSkipFields (Api), so the generic save() writes it; it is always sent with the current unedited entity, and state/cancelToken/… stay protected by defaultSkipFields.

Table of Contents

Methods

createComponentSubjectForm()  : Form
saveSubjectForm()  : bool
setSubjectFormDefaults()  : void

Methods

saveSubjectForm()

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

Search results