TYPO3CMS
9.5
Main Page
Related Pages
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
Variables
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
Files
File List
File Members
All
$
d
e
r
u
Functions
Variables
$
e
r
Examples
•
All
Classes
Namespaces
Files
Functions
Variables
Pages
FormState.php
Go to the documentation of this file.
1
<?php
2
declare(strict_types = 1);
3
namespace
TYPO3\CMS\Form\Domain\Runtime
;
4
5
/*
6
* This file is part of the TYPO3 CMS project.
7
*
8
* It originated from the Neos.Form package (www.neos.io)
9
*
10
* It is free software; you can redistribute it and/or modify it under
11
* the terms of the GNU General Public License, either version 2
12
* of the License, or any later version.
13
*
14
* For the full copyright and license information, please read the
15
* LICENSE.txt file that was distributed with this source code.
16
*
17
* The TYPO3 project - inspiring people to share!
18
*/
19
20
use
TYPO3\CMS\Core\Utility\ArrayUtility
;
21
use
TYPO3\CMS\Core\Utility\Exception\MissingArrayPathException
;
22
31
class
FormState
32
{
33
38
const
NOPAGE
= -1;
39
45
protected
$lastDisplayedPageIndex
=
self::NOPAGE
;
46
50
protected
$formValues
= [];
51
55
public
function
isFormSubmitted
(): bool
56
{
57
return
$this->lastDisplayedPageIndex !==
self::NOPAGE
;
58
}
59
63
public
function
getLastDisplayedPageIndex
(): int
64
{
65
return
$this->lastDisplayedPageIndex
;
66
}
67
71
public
function
setLastDisplayedPageIndex
(
int
$lastDisplayedPageIndex
)
72
{
73
$this->lastDisplayedPageIndex =
$lastDisplayedPageIndex
;
74
}
75
79
public
function
getFormValues
(): array
80
{
81
return
$this->formValues
;
82
}
83
88
public
function
setFormValue
(
string
$propertyPath, $value)
89
{
90
$this->formValues =
ArrayUtility::setValueByPath
(
91
$this->formValues,
92
$propertyPath,
93
$value,
94
'.'
95
);
96
}
97
102
public
function
getFormValue
(
string
$propertyPath)
103
{
104
try
{
105
return
ArrayUtility::getValueByPath
($this->formValues, $propertyPath,
'.'
);
106
}
catch
(MissingArrayPathException $exception) {
107
return
null
;
108
}
109
}
110
}
TYPO3\CMS\Form\Domain\Runtime\FormState\setFormValue
setFormValue(string $propertyPath, $value)
Definition:
FormState.php:86
TYPO3\CMS\Form\Domain\Runtime\FormState\isFormSubmitted
bool isFormSubmitted()
Definition:
FormState.php:53
TYPO3\CMS\Form\Domain\Runtime\FormState\NOPAGE
const NOPAGE
Definition:
FormState.php:38
TYPO3\CMS\Core\Utility\Exception\MissingArrayPathException
Definition:
MissingArrayPathException.php:26
TYPO3\CMS\Form\Domain\Runtime\FormState\$formValues
array $formValues
Definition:
FormState.php:48
TYPO3\CMS\Form\Domain\Runtime\FormState
Definition:
FormState.php:32
TYPO3\CMS\Form\Domain\Runtime\FormState\setLastDisplayedPageIndex
setLastDisplayedPageIndex(int $lastDisplayedPageIndex)
Definition:
FormState.php:69
TYPO3\CMS\Form\Domain\Runtime\FormState\$lastDisplayedPageIndex
int $lastDisplayedPageIndex
Definition:
FormState.php:44
TYPO3\CMS\Form\Domain\Runtime
TYPO3\CMS\Core\Utility\ArrayUtility\getValueByPath
static mixed getValueByPath(array $array, $path, $delimiter='/')
Definition:
ArrayUtility.php:179
TYPO3\CMS\Form\Domain\Runtime\FormState\getFormValue
mixed getFormValue(string $propertyPath)
Definition:
FormState.php:100
TYPO3\CMS\Form\Domain\Runtime\FormState\getFormValues
array getFormValues()
Definition:
FormState.php:77
TYPO3\CMS\Core\Utility\ArrayUtility\setValueByPath
static array setValueByPath(array $array, $path, $value, $delimiter='/')
Definition:
ArrayUtility.php:271
TYPO3\CMS\Core\Utility\ArrayUtility
Definition:
ArrayUtility.php:23
TYPO3\CMS\Form\Domain\Runtime\FormState\getLastDisplayedPageIndex
int getLastDisplayedPageIndex()
Definition:
FormState.php:61
doxygen
typo3
sysext
form
Classes
Domain
Runtime
FormState.php
Generated on Tue Oct 5 2021 01:57:40 for TYPO3CMS by
1.8.18