TYPO3 CMS
TYPO3_6-2
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
r
s
t
u
v
w
+
Files
File List
+
File Members
+
All
$
(
_
a
c
d
e
f
h
i
l
o
p
r
s
t
u
x
+
Functions
_
a
c
d
e
f
i
l
o
p
r
s
u
x
+
Variables
$
(
_
a
d
e
h
i
p
r
s
t
Examples
•
All
Classes
Namespaces
Files
Functions
Variables
Pages
InArrayValidator.php
Go to the documentation of this file.
1
<?php
2
namespace
TYPO3\CMS\Form\Validation
;
3
22
class
InArrayValidator
extends
\TYPO3\CMS\Form\Validation\AbstractValidator
{
23
29
const
LOCALISATION_OBJECT_NAME
=
'tx_form_system_validate_inarray'
;
30
36
protected
$array
;
37
43
protected
$strict
;
44
50
public
function
__construct
($arguments) {
51
$this->
setArray
($arguments[
'array.'
])->setStrict($arguments[
'strict'
]);
52
parent::__construct($arguments);
53
}
54
61
public
function
isValid
() {
62
if
($this->requestHandler->has($this->fieldName)) {
63
$value = $this->requestHandler->getByMethod($this->fieldName);
64
if
(!in_array($value, $this->array, $this->strict)) {
65
return
FALSE;
66
}
67
}
68
return
TRUE;
69
}
70
77
public
function
setArray
(
$array
) {
78
$this->array = (array)
$array
;
79
return
$this;
80
}
81
88
public
function
setStrict
(
$strict
) {
89
$this->strict = (bool)
$strict
;
90
return
$this;
91
}
92
93
}
TYPO3\CMS\Form\Validation\InArrayValidator
Definition:
InArrayValidator.php:22
TYPO3\CMS\Form\Validation\InArrayValidator\setArray
setArray($array)
Definition:
InArrayValidator.php:77
TYPO3\CMS\Form\Validation\InArrayValidator\$strict
$strict
Definition:
InArrayValidator.php:43
TYPO3\CMS\Form\Validation\AbstractValidator
Definition:
AbstractValidator.php:22
TYPO3\CMS\Form\Validation\InArrayValidator\setStrict
setStrict($strict)
Definition:
InArrayValidator.php:88
TYPO3\CMS\Form\Validation\InArrayValidator\LOCALISATION_OBJECT_NAME
const LOCALISATION_OBJECT_NAME
Definition:
InArrayValidator.php:29
TYPO3\CMS\Form\Validation\InArrayValidator\__construct
__construct($arguments)
Definition:
InArrayValidator.php:50
TYPO3\CMS\Form\Validation
Definition:
AbstractValidator.php:2
TYPO3\CMS\Form\Validation\InArrayValidator\isValid
isValid()
Definition:
InArrayValidator.php:61
TYPO3\CMS\Form\Validation\InArrayValidator\$array
$array
Definition:
InArrayValidator.php:36
typo3
sysext
form
Classes
Validation
InArrayValidator.php
Generated on Wed Aug 7 2019 09:52:27 for TYPO3 CMS by
1.8.13