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
NameAttribute.php
Go to the documentation of this file.
1
<?php
2
namespace
TYPO3\CMS\Form\Domain\Model\Attribute
;
3
22
class
NameAttribute
extends
\TYPO3\CMS\Form\Domain\Model\Attribute\AbstractAttribute
{
23
29
protected
$addition
;
30
36
protected
$returnValueWithoutPrefix
= FALSE;
37
43
public
function
getValueWithoutPrefix
() {
44
$value
= (string) $this->value;
45
// Change spaces into hyphens
46
$value
= preg_replace(
'/\\s/'
,
'-'
,
$value
);
47
// Remove non-word characters
48
$value
= preg_replace(
'/[^a-zA-Z0-9_\\-]+/'
,
''
,
$value
);
49
if
(empty(
$value
)) {
50
$value
=
$this->elementId
;
51
}
52
return
$value
;
53
}
54
69
public
function
getValue
() {
70
$value
= $this->
getValueWithoutPrefix
();
71
if
($this->returnValueWithoutPrefix === FALSE) {
72
$requestHandler =
\TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance
(
'TYPO3\\CMS\\Form\\Request'
);
73
$attribute = $requestHandler->getPrefix() .
'['
.
$value
.
']'
.
$this->addition
;
74
}
else
{
75
$attribute =
$value
;
76
}
77
return
$attribute;
78
}
79
87
public
function
setAddition
(
$addition
) {
88
$this->addition = (string)
$addition
;
89
return
$this;
90
}
91
99
public
function
setReturnValueWithoutPrefix
($parameter) {
100
$this->returnValueWithoutPrefix = (bool) $parameter;
101
}
102
103
}
TYPO3\CMS\Form\Domain\Model\Attribute\NameAttribute\getValueWithoutPrefix
getValueWithoutPrefix()
Definition:
NameAttribute.php:43
TYPO3\CMS\Form\Domain\Model\Attribute\NameAttribute
Definition:
NameAttribute.php:22
TYPO3\CMS\Form\Domain\Model\Attribute\NameAttribute\setReturnValueWithoutPrefix
setReturnValueWithoutPrefix($parameter)
Definition:
NameAttribute.php:99
TYPO3\CMS\Form\Domain\Model\Attribute\AbstractAttribute\$value
$value
Definition:
AbstractAttribute.php:29
TYPO3\CMS\Form\Domain\Model\Attribute\AbstractAttribute\$elementId
$elementId
Definition:
AbstractAttribute.php:36
TYPO3\CMS\Form\Domain\Model\Attribute\AbstractAttribute
Definition:
AbstractAttribute.php:22
TYPO3\CMS\Core\Utility\GeneralUtility\makeInstance
static makeInstance($className)
Definition:
GeneralUtility.php:4424
TYPO3\CMS\Form\Domain\Model\Attribute\NameAttribute\setAddition
setAddition($addition)
Definition:
NameAttribute.php:87
TYPO3\CMS\Form\Domain\Model\Attribute
Definition:
AbstractAttribute.php:2
TYPO3\CMS\Form\Domain\Model\Attribute\NameAttribute\$addition
$addition
Definition:
NameAttribute.php:29
TYPO3\CMS\Form\Domain\Model\Attribute\NameAttribute\$returnValueWithoutPrefix
$returnValueWithoutPrefix
Definition:
NameAttribute.php:36
TYPO3\CMS\Form\Domain\Model\Attribute\NameAttribute\getValue
getValue()
Definition:
NameAttribute.php:69
typo3
sysext
form
Classes
Domain
Model
Attribute
NameAttribute.php
Generated on Wed Aug 7 2019 09:52:27 for TYPO3 CMS by
1.8.13