CoolCMS API

PaymentFormTrait

Add/edit form of an advert payment item.

The foreign keys (advert, tariff, category, user, payment) are chosen by Pickers into hidden scalar fields. When an active item is saved, the Api manager propagates the advert state (paid, expiration_date); this form does not.

Table of Contents

Constants

PI_DT_FORMAT  : mixed = 'Y-m-d\TH:i'
Value format of `<input type=datetime-local>`.

Methods

createComponentEditForm()  : Form
piIntOrNull()  : int|null
savePaymentItemForm()  : bool
setPaymentItemFormDefaults()  : void

Constants

PI_DT_FORMAT

Value format of `<input type=datetime-local>`.

private mixed PI_DT_FORMAT = 'Y-m-d\TH:i'

Methods

piIntOrNull()

private piIntOrNull(mixed $value) : int|null
Parameters
$value : mixed
Return values
int|null

savePaymentItemForm()

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

Search results