AfformFormatTrait
Class AfformFormatTrait
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
- getFormatWhitespace() : string
- getLayoutFormat() : string
- setFormatWhitespace() : $this
- setLayoutFormat() : $this
- convertHtmlToOutput() : mixed
- convertInputToHtml() : string
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
getFormatWhitespace()
public
getFormatWhitespace() : string
Return values
stringgetLayoutFormat()
public
getLayoutFormat() : string
Return values
stringsetFormatWhitespace()
public
setFormatWhitespace([string $formatWhitespace = ]) : $this
Parameters
- $formatWhitespace : string =
Return values
$thissetLayoutFormat()
public
setLayoutFormat([string $layoutFormat = ]) : $this
Parameters
- $layoutFormat : string =
Return values
$thisconvertHtmlToOutput()
protected
convertHtmlToOutput(string $html) : mixed
Parameters
- $html : string
Tags
convertInputToHtml()
protected
convertInputToHtml(mixed $mixed) : string
Parameters
- $mixed : mixed