FormState
The current state of the form which is attached to the {@link FormRuntime} and saved in a session or the client.
Scope: frontend This class is NOT meant to be sub classed by developers.
Table of Contents
Constants
- NOPAGE : mixed = -1
- Constant which means that we are currently not on any page; i.e. the form has never rendered before.
Properties
- $formValues : array
- $honeypotNames : array<int, string>
- $lastDisplayedPageIndex : int
- The last displayed page index
Methods
- getFormValue() : mixed
- getFormValues() : array
- getHoneypotName() : string|null
- getLastDisplayedPageIndex() : int
- isFormSubmitted() : bool
- setFormValue() : mixed
- setHoneypotName() : void
- setLastDisplayedPageIndex() : mixed
Constants
NOPAGE
Constant which means that we are currently not on any page; i.e. the form has never rendered before.
public
mixed
NOPAGE
= -1
Properties
$formValues
protected
array
$formValues
= []
$honeypotNames
protected
array<int, string>
$honeypotNames
= []
honeypot element identifiers, indexed by page index
$lastDisplayedPageIndex
The last displayed page index
protected
int
$lastDisplayedPageIndex
= self::NOPAGE
Methods
getFormValue()
public
getFormValue(string $propertyPath) : mixed
Parameters
- $propertyPath : string
getFormValues()
public
getFormValues() : array
Return values
arraygetHoneypotName()
public
getHoneypotName(int $pageIndex) : string|null
Parameters
- $pageIndex : int
Return values
string|nullgetLastDisplayedPageIndex()
public
getLastDisplayedPageIndex() : int
Return values
intisFormSubmitted()
public
isFormSubmitted() : bool
Return values
bool —FALSE if the form has never been submitted before, TRUE otherwise
setFormValue()
public
setFormValue(string $propertyPath, mixed $value) : mixed
Parameters
- $propertyPath : string
- $value : mixed
setHoneypotName()
public
setHoneypotName(int $pageIndex, string $honeypotName) : void
Parameters
- $pageIndex : int
- $honeypotName : string
setLastDisplayedPageIndex()
public
setLastDisplayedPageIndex(int $lastDisplayedPageIndex) : mixed
Parameters
- $lastDisplayedPageIndex : int