Documentation

AfformTranslateTrait 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

convertHtmlToOutput()  : mixed
convertInputToHtml()  : string
getFieldTranslations()  : array<string|int, mixed>
Get Field Source Strings array $fields
saveSourceTranslations()  : mixed
Save Field Source Strings array $strings
saveTranslations()  : mixed
Save Translations for Afform array $item

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

getFieldTranslations()

Get Field Source Strings array $fields

protected getFieldTranslations(mixed $fields) : array<string|int, mixed>
Parameters
$fields : mixed
Return values
array<string|int, mixed>

saveSourceTranslations()

Save Field Source Strings array $strings

protected saveSourceTranslations(mixed $strings) : mixed
Parameters
$strings : mixed

saveTranslations()

Save Translations for Afform array $item

protected saveTranslations(mixed $item) : mixed
Parameters
$item : mixed

        
On this page

Search results