Documentation

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
options

html,shallow,deep

Methods

getFormatWhitespace()

public getFormatWhitespace() : string
Return values
string

setFormatWhitespace()

public setFormatWhitespace([string $formatWhitespace = ]) : $this
Parameters
$formatWhitespace : string =
Return values
$this

setLayoutFormat()

public setLayoutFormat([string $layoutFormat = ]) : $this
Parameters
$layoutFormat : string =
Return values
$this

        
On this page

Search results