AfformSaveTrait uses trait:short
Class AfformSaveTrait.
Table of Contents
Properties
- $formatWhitespace : bool
- Optionally manage whitespace for the "layout" property
- $layoutFormat : string
- Controls the return format of the "layout" property - "html" will return layout html as-is.
Methods
- checkNameForAfform() : void
- convertHtmlToOutput() : mixed
- convertInputToHtml() : string
- saveTranslations() : mixed
- Save Translation Strings from Form to database array $form string $html
- writeRecord() : mixed
Properties
$formatWhitespace
Optionally manage whitespace for the "layout" property
protected
bool
$formatWhitespace
= FALSE
This option will strip whitepace from the returned layout array for get actions,
and will auto-indent the aff.html for save actions.
Note: Has no effect on get with "html" return format, which returns html as-is.
$layoutFormat
Controls the return format of the "layout" property - "html" will return layout html as-is.
protected
string
$layoutFormat
= 'deep'
- "shallow" will convert most html to an array, but leave tag attributes and af-markup containers alone.
- "deep" will attempt to convert all html to an array, including tag attributes.
Tags
Methods
checkNameForAfform()
protected
checkNameForAfform(array<string|int, mixed> &$item, array<string|int, mixed> &$orig, CRM_Afform_AfformScanner $scanner) : void
Parameters
- $item : array<string|int, mixed>
-
The afform item being processed.
- $orig : array<string|int, mixed>
-
The existing afform if already created.
- $scanner : CRM_Afform_AfformScanner
Tags
convertHtmlToOutput()
protected
convertHtmlToOutput(string $html) : mixed
Parameters
- $html : string
Tags
convertInputToHtml()
protected
convertInputToHtml(mixed $mixed) : string
Parameters
- $mixed : mixed
Tags
Return values
stringsaveTranslations()
Save Translation Strings from Form to database array $form string $html
protected
static saveTranslations(mixed $form, mixed $html) : mixed
Parameters
- $form : mixed
- $html : mixed
writeRecord()
protected
writeRecord(mixed $item) : mixed
Parameters
- $item : mixed