CoolCMS API

FormFieldsTrait

Meta fields beyond the parameters: the edit password and reCAPTCHA.

They are not stored as AdvertParameterRel, so they are added through the hook beforeSubmitButton(), not through parameterItems.

Table of Contents

Constants

ADVERT_PASSWORD_MIN_LENGTH  : mixed = 6
Minimum length of a custom edit password of an advert.

Methods

beforeSubmitButton()  : void
gateAdvertColumns()  : void
Column gate of the contact e-mail parameter: it is written into the profile column `email` varchar(255) ({@see BuildAdvertTrait}). The parameter builder knows only the parameter type, so a longer value failed the whole save on the database with the generic "could not be saved" message instead of an error at the field.
parameterControl()  : BaseControl|null
Form control of the parameter with the given key, null when the category does not use it.

Constants

ADVERT_PASSWORD_MIN_LENGTH

Minimum length of a custom edit password of an advert.

private mixed ADVERT_PASSWORD_MIN_LENGTH = 6

Methods

gateAdvertColumns()

Column gate of the contact e-mail parameter: it is written into the profile column `email` varchar(255) ({@see BuildAdvertTrait}). The parameter builder knows only the parameter type, so a longer value failed the whole save on the database with the generic "could not be saved" message instead of an error at the field.

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

parameterControl()

Form control of the parameter with the given key, null when the category does not use it.

private parameterControl(Form $form, string $key) : BaseControl|null
Parameters
$form : Form
$key : string
Return values
BaseControl|null
On this page

Search results