CoolCMS API

EmailQueueFormTrait

Add/edit form of an email queue item.

The skeleton comes from BasePresenter::createForm(). The entity is flat (no translations), so there are no language tabs or Picker. replyTos is stored in the DB as a serialized array (legacy format) and the form edits it as comma-separated text.

TODO: attachments (files, legacy serialized uploader) are not converted yet.

Table of Contents

Methods

createComponentEditForm()  : Form
buildEmailQueueEntity()  : EmailQueue
replyToList()  : array<int, string>
Splits a comma-separated address list (stored as a serialized array, legacy `reply_tos` format).
saveEmailQueueForm()  : bool
Saves the form data; the redirect is handled by {@see \App\Core\Base\Admin\BasePresenter::createForm()}.
setEmailQueueFormDefaults()  : void
str()  : string
Safely converts a mixed form value to string.

Methods

replyToList()

Splits a comma-separated address list (stored as a serialized array, legacy `reply_tos` format).

private replyToList(mixed $value) : array<int, string>
Parameters
$value : mixed
Return values
array<int, string>

saveEmailQueueForm()

Saves the form data; the redirect is handled by {@see \App\Core\Base\Admin\BasePresenter::createForm()}.

private saveEmailQueueForm(ArrayHash<string|int, mixed> $values) : bool
Parameters
$values : ArrayHash<string|int, mixed>
Return values
bool

str()

Safely converts a mixed form value to string.

private str(mixed $value) : string
Parameters
$value : mixed
Return values
string
On this page

Search results