TYPO3 CMS  TYPO3_6-2
LoadWizardView.php
Go to the documentation of this file.
1 <?php
3 
23 
31  public function render() {
32  $jsonObject = $this->repository->getRecordAsJson();
33  $this->headerOutput($jsonObject);
34  }
35 
42  protected function headerOutput($jsonObject) {
43  if (!$jsonObject) {
44  header('HTTP/1.1 500 Internal Server Error');
45  $jsonArray = array('message' => 'Failed to save the form');
46  } else {
47  $jsonArray = array('configuration' => $jsonObject);
48  }
49  $json = json_encode($jsonArray);
50  header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
51  header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . 'GMT');
52  header('Cache-Control: no-cache, must-revalidate');
53  header('Pragma: no-cache');
54  header('Content-Length: ' . strlen($json));
55  header('Content-Type: application/json; charset=utf-8');
56  header('Content-Transfer-Encoding: 8bit');
57  echo $json;
58  die;
59  }
60 
61 }
die
Definition: index.php:6