‪TYPO3CMS  10.4
TYPO3\CMS\Form\Domain\Runtime\FormState Class Reference

Public Member Functions

bool isFormSubmitted ()
 
int getLastDisplayedPageIndex ()
 
 setLastDisplayedPageIndex (int $lastDisplayedPageIndex)
 
array getFormValues ()
 
 setFormValue (string $propertyPath, $value)
 
mixed getFormValue (string $propertyPath)
 

Public Attributes

const NOPAGE = -1
 

Protected Attributes

int $lastDisplayedPageIndex = self::NOPAGE
 
array $formValues = array( )
 

Detailed Description

The current state of the form which is attached to the FormRuntime and saved in a session or the client.

Scope: frontend This class is NOT meant to be sub classed by developers.

Definition at line 35 of file FormState.php.

Member Function Documentation

◆ getFormValue()

mixed TYPO3\CMS\Form\Domain\Runtime\FormState::getFormValue ( string  $propertyPath)
Parameters
string$propertyPath
Returns
‪mixed

Definition at line 104 of file FormState.php.

References TYPO3\CMS\Core\Utility\ArrayUtility\getValueByPath().

◆ getFormValues()

array TYPO3\CMS\Form\Domain\Runtime\FormState::getFormValues ( )
Returns
‪array

Definition at line 81 of file FormState.php.

References TYPO3\CMS\Form\Domain\Runtime\FormState\$formValues.

◆ getLastDisplayedPageIndex()

int TYPO3\CMS\Form\Domain\Runtime\FormState::getLastDisplayedPageIndex ( )
Returns
‪int

Definition at line 65 of file FormState.php.

References TYPO3\CMS\Form\Domain\Runtime\FormState\$lastDisplayedPageIndex.

◆ isFormSubmitted()

bool TYPO3\CMS\Form\Domain\Runtime\FormState::isFormSubmitted ( )
Returns
‪bool FALSE if the form has never been submitted before, TRUE otherwise

Definition at line 57 of file FormState.php.

References TYPO3\CMS\Form\Domain\Runtime\FormState\NOPAGE.

◆ setFormValue()

TYPO3\CMS\Form\Domain\Runtime\FormState::setFormValue ( string  $propertyPath,
  $value 
)
Parameters
string$propertyPath
mixed$value

Definition at line 90 of file FormState.php.

References TYPO3\CMS\Core\Utility\ArrayUtility\setValueByPath().

◆ setLastDisplayedPageIndex()

TYPO3\CMS\Form\Domain\Runtime\FormState::setLastDisplayedPageIndex ( int  $lastDisplayedPageIndex)
Parameters
int$lastDisplayedPageIndex

Definition at line 73 of file FormState.php.

References TYPO3\CMS\Form\Domain\Runtime\FormState\$lastDisplayedPageIndex.

Member Data Documentation

◆ $formValues

array TYPO3\CMS\Form\Domain\Runtime\FormState::$formValues = array( )
protected

Definition at line 52 of file FormState.php.

Referenced by TYPO3\CMS\Form\Domain\Runtime\FormState\getFormValues().

◆ $lastDisplayedPageIndex

int TYPO3\CMS\Form\Domain\Runtime\FormState::$lastDisplayedPageIndex = self::NOPAGE
protected

◆ NOPAGE

const TYPO3\CMS\Form\Domain\Runtime\FormState::NOPAGE = -1

Constant which means that we are currently not on any page; i.e. the form has never rendered before.

Definition at line 42 of file FormState.php.

Referenced by TYPO3\CMS\Form\Domain\Runtime\FormState\isFormSubmitted().