CoolCMS API

BillingLineFormTrait

Add/edit form of a billing line: multilingual texts (`name`/`description`) and the main fields (number mask, numbering period, length of the numeric part).

The mask and the period feed InvoiceNumberGenerator.

Table of Contents

Constants

BILLING_PERIODS  : mixed = ['never', 'year', 'month', 'day']
Numbering period options; the values must match `BillingLine::billingPeriod` (enum).

Methods

createComponentEditForm()  : Form
addBillingLineMainFields()  : void
Number mask, numbering period and length of the numeric part.
addBillingLineTranslationFields()  : void
Multilingual texts (`name`/`description`), active according to the checkbox.
buildBillingLineEntity()  : BillingLine
saveBillingLineForm()  : bool
setBillingLineFormDefaults()  : void

Constants

BILLING_PERIODS

Numbering period options; the values must match `BillingLine::billingPeriod` (enum).

private mixed BILLING_PERIODS = ['never', 'year', 'month', 'day']

Methods

addBillingLineMainFields()

Number mask, numbering period and length of the numeric part.

private addBillingLineMainFields(Form $form) : void
Parameters
$form : Form

addBillingLineTranslationFields()

Multilingual texts (`name`/`description`), active according to the checkbox.

private addBillingLineTranslationFields(Form $form) : void
Parameters
$form : Form

saveBillingLineForm()

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

Search results