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
▼
TYPO3 CMS
TYPO3 CMS
Test List
Todo List
Deprecated List
►
Namespace Members
►
Classes
▼
Files
►
File List
►
File Members
►
Examples
•
All
Classes
Namespaces
Files
Functions
Variables
Pages
SaveWizardView.php
Go to the documentation of this file.
1
<?php
2
namespace
TYPO3\CMS\Form\View\Wizard
;
3
21
class
SaveWizardView
extends
\TYPO3\CMS\Form\View\Wizard\AbstractWizardView
{
22
30
public
function
render
() {
31
$success = FALSE;
32
// Check if the referenced record is available
33
$this->recordIsAvailable = $this->repository->hasRecord();
34
if
($this->recordIsAvailable) {
35
// Save the data
36
$success = $this->repository->save();
37
}
38
$this->
headerOutput
($success);
39
}
40
47
protected
function
headerOutput
($success) {
48
if
(!$success) {
49
header(
'HTTP/1.1 500 Internal Server Error'
);
50
$jsonArray = array(
'message'
=>
'Failed to save the form'
);
51
}
else
{
52
$jsonArray = array(
'message'
=>
'Changes saved successfully'
);
53
}
54
$json = json_encode($jsonArray);
55
header(
'Expires: Mon, 26 Jul 1997 05:00:00 GMT'
);
56
header(
'Last-Modified: '
. gmdate(
'D, d M Y H:i:s'
) .
'GMT'
);
57
header(
'Cache-Control: no-cache, must-revalidate'
);
58
header(
'Pragma: no-cache'
);
59
header(
'Content-Length: '
. strlen($json));
60
header(
'Content-Type: application/json; charset=utf-8'
);
61
header(
'Content-Transfer-Encoding: 8bit'
);
62
echo $json;
63
die
;
64
}
65
66
}
TYPO3\CMS\Form\View\Wizard\SaveWizardView\render
render()
Definition:
SaveWizardView.php:30
TYPO3\CMS\Form\View\Wizard\SaveWizardView
Definition:
SaveWizardView.php:21
die
die
Definition:
index.php:6
TYPO3\CMS\Form\View\Wizard
Definition:
AbstractWizardView.php:2
TYPO3\CMS\Form\View\Wizard\AbstractWizardView
Definition:
AbstractWizardView.php:22
TYPO3\CMS\Form\View\Wizard\SaveWizardView\headerOutput
headerOutput($success)
Definition:
SaveWizardView.php:47
typo3
sysext
form
Classes
View
Wizard
SaveWizardView.php
Generated on Wed Aug 7 2019 09:52:27 for TYPO3 CMS by
1.8.13