Documentation

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
options

html,shallow,deep

Methods

saveTranslations()

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

        
On this page

Search results